I am currently reading a text file in VB.Net using
Dim fileReader As String
fileReader = My.Computer.FileSystem.ReadAllText(file)
The file contains several lines of text, and when I read in a text file, it knows that they are on separate lines and prints them accordingly.
However, when I try to split the Reader file into an array of different lines, the line break seems to remain there even if I use Split(ControlChars.Cr)or Split(ControlChars.NewLine). It will successfully split it into separate lines, but when I show it, it will “push” the text onto the line, as if the line break is still there ...
Does anyone have any ideas on what is going on and how I can remove these “invisible” control characters.
Text file:
Test1
Test2
Test3
Test4
FileReader:
Test1
Test2
Test3
Test4
()
Test1
Test2
Test3
Test4