我正在编写单元测试,不记得用于初始化带有大量格式化文本的字符串的语法。
string _testData = "a couple screens worth of text data here
and I need to preserve the formatting
such as line breaks,
etc.";
最佳答案
在文字前添加@
。
string _testData = @"a couple screens worth of text data here
and I need to preserve the formatting
such as line breaks,
etc.";