Create a newline in rich text box in C#


There are two ways to create new lin in RichtTextBox control in C#, by  using:

  • RichTextBox.Text property
  • RichtTextBox.AppendText method

RichTextBox.Text property

myRichTextBox.Text += Environment.NewLine + "New line goes here";

RichtTextBox.AppendText method

myRichTextBox.AppendText(Environment.NewLine + "New line goes here");

 

Related Articles

Export Data from DataTable to PDF in C# using iTextSharp

Create Your First C# Program

Create a Simple Thread Program Using C#

Tutorials Panel

About Tutorials Panel

programming tutorial and source code for Software Engineers and developers. https://twitter.com/TutorialsPanel

View all posts by Tutorials Panel →

Leave a Reply