C# Line Feed

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

Real basic question here. Since I'm new to C#, how do I code a line feed
for text. I want to have several paragraphs in a text box and need some
space between them. Also, please respond with how to concatenated the two
strings together along with the line feeds. From what I remember from my
C++ days it was always \n and with an ANSI string I could always do
something like "String1" + \n\n + "String2"; but apparently that doesn't
work in C#

Thanks
 
Carriage Return = \r
New Line = \n

You need both: \r\n

so Console.WriteLine("Hello\r\nWorld");
 
Back
Top