[Solved] Trouble with finding new line character from a string, Reading Text from .txt file


.Split will delete the delimiter characters, and the resulting output will not include them.

From MSDN:

Delimiter characters are not included in the elements of the returned
array.

If you need to find the length of a line, just use the .Length property of the string.

In any case, as mentioned in the comments, use the File.ReadAllLines method to avoid having to split the file contents yourself.

solved Trouble with finding new line character from a string, Reading Text from .txt file