I am writing an app that allows a user to navigate to a .txt file and with the file selected I need it to read the files lines creating a new array member based off each line. (though if you can think of an easier solution please feel free to mention it.)
I am reading the file and using the line count to set the number of array members:
// count the number of lines in a file
newobject.Count = newobject.CountLinesInFile(@newobject.cs?
// create an array with elements for all lines
string lines = new string[(newobject.Count)];
How can I tell it to read the line of text UNTIL "\n" or "\r" so that each new line is its own member in the array "lines."
khao san road
1 post • Page 1 of 1