|
-
Nov 14th, 2010, 11:29 PM
#5
Fanatic Member
Re: reading a text file
 Originally Posted by jmcilhinney
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?
If I helped you out, please take the time to rate me 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|