This project is read-only.

New rule: Use Environment.NewLine instead of "\r\n" and "\n" strings

Apr 7, 2011 at 11:44 PM


I'd like to propose new rule - Environment.NewLine should be used to provide OS-independent line breaks in strings. This is important when one creates code that will run on non-windows OS, e.g. using Mono. StyleCop could report all occurances of "\r\n" and "\n" inside strings to help fight this issue.


Apr 8, 2011 at 8:00 AM
Content of strings like this feels like an fxcop rule rather than the style of your code.