C#. Add new line symbol to string

Each time I forget how to add new line symbol to string. I decided to add to memories. Below how to add new line symbol to string in C#.

string message = Label1.Text;
message = message.Replace("<br />", System.Environment.NewLine);

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *