Add new line of data to TextBox in C#
To add a new line of data to TextBox in C#, we can useAppendText()
method which takes String parameter, the new Line property in C# is Environment.NewLine
. Example
sampleTextBox.AppendText("Hello User,");
sampleTextBox.AppendText(Environment.NewLine);
sampleTextBox.AppendText("Welcome!");