I'm reading in a large file line by line using TextStream.ReadLine.
However, if I recieve a certain bit of data I know I can finish reading the file early (which is ~65000 lines long). At the moment I'm doing a TextStream.Readall to get to the end of the file and force TextStream.AtEndOfStream to be true enabling my loop to exit.
I'm not filling a string with this ReadAll method, so am I wasting any memory. What happens to all the data that .Read All reads when I dont set a string equal to the methods return value?
Is there a way of getting to the end of the file as quickly without wasting any memory?
Cheers,
elziko
However, if I recieve a certain bit of data I know I can finish reading the file early (which is ~65000 lines long). At the moment I'm doing a TextStream.Readall to get to the end of the file and force TextStream.AtEndOfStream to be true enabling my loop to exit.
I'm not filling a string with this ReadAll method, so am I wasting any memory. What happens to all the data that .Read All reads when I dont set a string equal to the methods return value?
Is there a way of getting to the end of the file as quickly without wasting any memory?
Cheers,
elziko