SSW Foursquare

Do you format "Environment.NewLine" at the end of a line?

Last updated by Brady Stroud [SSW] about 1 month ago.See history

You 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\

Adam Cogan
We open source. Powered by GitHub