I have a really large text file, lets say 500MB. I know we can use File.ReadLines()
to read the file. It will iterate the text file line by line, thus saving the memory greatly. But what if my file is a single line? I have a text file contain a base64string, when I tried to use File.ReadLines()
, I got an 'Out of Memory' exception.
How do I solve this?