C# 中带@字符串中的转义符号
时间:2015-03-10 13:42:13
收藏:0
阅读:275
C#转义字符
c#里 @ 表示的是:
1、在C#中,"c:\\temp"表示路径是c:\temp; 而@"c:\temp"就表示c:\temp;
所以,@的作用就应该是忽略转义字符的作用.
2、如果字符串中有",则写成"";如:
string aa=@"{ name:""name"" }";
3、在string.format 方法中{,则写成{{
原文:http://www.cnblogs.com/Dylanblogs/p/4325685.html
评论(0)