2
Answers

Load text file to memory, read by lines

Sam

Sam

14y
8.3k
1

Hi,
A simple basic question:
I have an application in which I read ocasunally lines from a text file.
I currently use StreamReader and LoadLine() in a loop to call.
My problem is that I do not want to keep the file open all the time, and therefroe I wish to load the file bulk to memory and close the file, and then read lines from memory, (like the Readline()).
Please advise.
Sam
Answers (2)