C# string 字符串的前面可以加 @(称作"逐字字符串")将转义字符(\)当作普通字符对待,比如:

string str = @"C:\Windows";

等价于:
string str = "C:\\Windows";


@ 字符串中可以任意换行,换行符及缩进空格都计算在字符串长度之内。
string str = @"<script type=""text/javascript"">
    <!--
    -->
</script>";

相关文章:

  • 2022-01-10
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-16
  • 2022-12-23
  • 2021-08-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
  • 2021-11-05
  • 2021-04-21
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案