Quote Originally Posted by jmcilhinney View Post
It would be inefficient for the same reason: calling ReadAllLines requires reading the entire file. There's no point reading every line if you only need to read the first three. It's not a big deal if the file is small but the bigger the file, the more inefficient it becomes.
Ah okay thanks, that makes sense. I'm not too savvy with the technical side of streamreader, but doesn't that load the whole stream before you start reading lines? Or is a stream much more efficient to load than all the lines?