I assume the line break character used cannot be \r\n
When you read your entire file in one line, try calling yourString.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);and see if this works for you.
Also, since I ReadAllLines()just read on one line, you could just use ReadAllText().
source
share