Carriage Return in C#

/ Published in: C#
Save to your folder(s)

Sometimes you may need a carriage return in your text. Line 1 is the code for a carriage return in C# and line 3 shows an example of how to use it.

Copy this code and paste it in your HTML
  1. System.Environment.NewLine
  3. this.myTextArea.Text +=
  4. "This is the first line" +
  5. System.Environment.NewLine +
  6. "this is on the next line.";

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.