xsc*_*ape 8 c# string escaping c#-4.0
我有这个字符串临时,我想,以取代\\与\
string temp = "\\h\\k";
Run Code Online (Sandbox Code Playgroud)
我已经尝试过,temp.Replace("\\", "\")但输出是hk
我想要的输出\h\k
如何更换"\\"使用"\"?
谢谢
问题不太清楚,你在找这个吗?
string temp = @"\\h\\k";
temp = temp.Replace(@"\\", @"\");
Run Code Online (Sandbox Code Playgroud)