Doesn't C# treat the "\r\n" as an alias for Environment.NewLine?
It does in a Windows Environment, but not necessarily.
--
HTH,
Kevin Spencer
Microsoft MVP
Chicken Salad Shooter
http://unclechutney.blogspot.com
A man, a plan, a canal, a palindrome that has.. oh, never mind.
"Chris Dunaway" <du******@gmail.comwrote in message
news:11*********************@k70g2000cwa.googlegro ups.com...
Mattias Sjögren wrote:
In my C# windows form project, how to use the line return character in a
string so the string will go to a new line?
string s = "First line" + Environment.NewLine + "Second line";
Doesn't C# treat the "\r\n" as an alias for Environment.NewLine?
Wouldn't the code be more readable as:
string s = "First line\r\nSecondLine";
Just wondering,
Chris