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

[ad_1]

.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.

[ad_2]

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