且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从字符串C#中删除反斜杠

更新时间:2023-11-01 15:46:22

那些反斜杠实际上不会出现在最终字符串中。它们只是引号 的转义序列。

Those backslashes won't actually appear in the final string. They are just escape sequences for the quotes "".

MSDN转义序列

我的猜测是,您正在调试器中查看字符串,仍将其显示为未转义。

My guess is that you're viewing the string in the debugger which will still show them as unescaped.