【发布时间】:2014-11-19 08:22:14
【问题描述】:
只是好奇而已。我想知道为什么:
string str = @"//
// Use a new char[] array of two characters (\r and \n) to break
// lines from into separate strings. \n Use RemoveEmptyEntries
// to make sure no empty strings get put in the string array.
//";
richTextBox 的结果文本是:
//
// Use a new char[] array of two characters (\r and \n) to break
// lines from into separate strings. \n Use RemoveEmptyEntries
// to make sure no empty strings get put in the string array.
//
但是
string str = @"//
// Use a new char[] array of two characters (\r and \n) to break
// lines from into separate strings."+" \n" + @" Use RemoveEmptyEntries
// to make sure no empty strings get put in the string array.
//";
richTextBox 的结果文本是:
//
// Use a new char[] array of two characters (\r and \n) to break
// lines from into separate strings.
Use RemoveEmptyEntries
// to make sure no empty strings get put in the string array.
//
【问题讨论】:
标签: c# string newline richtextbox