gildfosh Posted August 14, 2004 Posted August 14, 2004 I don't understand how this function works...here is my situation, I have a file with a list, for example: Item 1 Item 2 Item 3 Item 4 Item 5 in a text file. Now, this file is over 4 megabytes, so there are lots of lines. i have built a program to get the byte position of let's say item 500 so it's easier to access a line rather than just going through the entire list looking for an item. How do I use streamreader to go to a byte position in a file and read the entire line? I have attempted to do this in severa; ways, but it is always off a couple bytes. Quote
Administrators PlausiblyDamp Posted August 14, 2004 Administrators Posted August 14, 2004 If you create a filestream and base your streamreader on that you could seek the underlying stream to the correct position and then read from the streamreader. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.