【发布时间】:2019-03-10 00:11:45
【问题描述】:
我正在这样做,就像在这个 answer 中一样:
string test = "test\"test";
test = test.Replace("\\\"", "");
但结果仍然是test = "test\"test"。
结果应该是test = "testtest",为什么我的替换不起作用?
【问题讨论】:
-
literal
test\"test被编译器解析并存储为test"test,所以字符串中没有斜杠 -
不确定是否标记为拼写错误...请注意
\"仅表示"。
标签: c#