Do you format "Environment.NewLine" at the end of a line?
Last updated by Brady Stroud [SSW] 7 months ago.See historyYou should format "Environment.NewLine" at the end of a line.
string message = "The database is not valid." + Environment.NewLine + "Do you want to upgrade it? ";
Bad example - "Environment.NewLine" isn't at the end of the line
string message = "The database is not valid." + Environment.NewLine;
message += "Do you want to upgrade it? ";
Good example - "Environment.NewLine" is at the end of the line
return string.Join(Environment.NewLine, paragraphs);
Good example - "Environment.NewLine" is an exception for String.Join\