相关疑难解决方法(0)

转义字符串中的双引号

双引号可以像这样转义:

string test = @"He said to me, ""Hello World"". How are you?";
Run Code Online (Sandbox Code Playgroud)

但这涉及"到字符串添加字符.是否有C#函数或其他方法来转义双引号,以便不需要更改字符串?

c# string double-quotes

151
推荐指数
8
解决办法
27万
查看次数

标签 统计

c# ×1

double-quotes ×1

string ×1