Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...