Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27193

VS 2012 Reading a very large file, one line at a time ?

$
0
0
I have this problem and perhaps someone with more knowledge of .NET could help me out?

Let's say I have a text file with 15+ millions of lines. I do not want the program to load the entire file into memory, instead I want to just read and process one line at a time without eventually loading the entire file.

When StreamReader is used, does it eventually load the entire file into memory?

Also, I can do this in Python using Generators, I think similar is possible with C#. But I could not find anything of that sort for VB.NET.

If you guys have any samples / examples on how this can be done, please share?

Thanks in advance!

Viewing all articles
Browse latest Browse all 27193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>