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);

 

 




MarkiMarta.com. Notes of web-specialist
Since 2009
18+