如何:生成多行字符串 (Visual C#) (转)

本示例说明两种构造多行字符串的方法。

 
 
string myString1 = "This is the first line of my string.\n" +
                   "This is the second line of my string.\n" +
                   "This is the third line of the string.\n";
string myString2 = @"This is the first line of my string.
This is the second line of my string.
This is the third line of the string.";

 

 
posted @ 2013-11-12 13:28  邹邹  Views(435)  Comments(0)    收藏  举报