In .NET I can provide both \r or \n string literals, but there is a way to insert
something like “new line” special character like Environment.NewLine static property?
In .NET I can provide both \r or \n string literals, but there is
Share
Well, simple options are:
string.Format:String concatenation:
String interpolation (in C#6 and above):
You could also use \n everywhere, and replace:
Note that you can’t make this a string constant, because the value of
Environment.NewLinewill only be available at execution time.