How to convert string that have \\r\\n to lines?
For example, take this string:
string source = \"hello \\r\\n this is a test \\r\\n tested\
Use String.Split Method (String[], StringSplitOptions) like this:
var lines = source.Split(new [] { "\r\n", "\n" }, StringSplitOptions.None);
This one will work regardless of whether the source is written with Windows linebreak \r\n or Unix \n.
As other answers mention, you could use StringSplitOptions.RemoveEmptyEntries instead of StringSplitOptions.None which, as the name says, removes empty strings (" " does not qualify for being empty, only ""does).