【发布时间】:2015-11-24 10:00:11
【问题描述】:
tw.WriteLine(@" ""Air Temperature sensor "" 20," + measure + ", 24, """ + this.time.Year + "-" + this.time.Month + "-" + this.time.Day + " " + this.time.Hour + ":" + this.time.Minute + ":" + this.time.Second + "\"");
当我有三个双引号时,我有 语法错误,',' 预期我尝试使用四个双引号,斜线但我再次遇到此错误。我知道转义双引号需要两个双引号。但对于我的情况是行不通的。
【问题讨论】:
-
你应该把@放在你想以这种方式转义双引号的每个字符串之前。
@"" + ""第二个添加的字符串不是逐字逐句的。 -
正在工作。谢谢。我忘了@
标签: c# escaping double-quotes