G
Guest
How can insert a " is a string ?
And Also
How can I insert a carriage return in a string ?
And Also
How can I insert a carriage return in a string ?
* =?Utf-8?B?dmVkYW50XzE1?= said:How can insert a " is a string ?
How can I insert a carriage return in a string ?
Uri Dor said:string BTW = @"this string includes
a newline";
Tim said:[C#]
string s = @"This is my "verbatim" string.";
string s = "This is my \"escaped\" string.";
[C#]
string s = "This is my string with a line break." + Environment.NewLine +
"Now I'm on a new line.";
Technically you could just use "\r\n" to indicate a new line. But the
Environment.NewLine property would be more robust in the sense that this
property returns a string based on the current platform. So if you, possibly
down the road, were running on a different platform then this would still
function properly. Plus, Environment.NewLine works in other languages were
"\r\n" is pretty much specific to the C language.
Is that what you were after?