双引号的转义

seasol 2003-11-05 03:57:36
string content="this is a \"test\"!";

为何转义字符没有起作用?
...全文
38 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
kerry803 2003-11-05
  • 打赏
  • 举报
回复
string content="this is a \"test\"!";


我在我机子上运行也是可以的呀!
可能是编译环境的原因。
LineCorner 2003-11-05
  • 打赏
  • 举报
回复
改正:
string content=@"this is a "test"!";
LineCorner 2003-11-05
  • 打赏
  • 举报
回复
string content=@"this is a \"test\"!";
seasol 2003-11-05
  • 打赏
  • 举报
回复
很有可能是运行环境的问题,我在另一台机子上通过了。
分少,大家将就点吧!
spiketang 2003-11-05
  • 打赏
  • 举报
回复
string content="this is a \"test\"!";
是不是你的运行环境有问题!
realsnow 2003-11-05
  • 打赏
  • 举报
回复
我这儿也是可以的

搂主自己多试试看吧
luyiping 2003-11-05
  • 打赏
  • 举报
回复
不会啊,我这里可以的啊。
iamwanghui 2003-11-05
  • 打赏
  • 举报
回复
string content = "this is a '+'"'+"test"+'"'+"!";

傻是傻了点儿,但能用,偶也想知道怎么搞好。。

110,568

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧