我正在编写单元测试,但不记得用一大块格式化文本初始化字符串的语法。
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.";
关于c# - 在 .NET 中用文本 block 初始化字符串的语法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/863572/