Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I have a program that will accept any text file from a user. The program then accepts basic parameters about that file, such as record length, field positions, etc. At this point, it reads the records to do some reformatting. The files may not have any carriage control/line field characters, so I can't use the StreamReader ReadLine(). I have started to use the StreamReader Read(...) but that loads all the data into an array. For later processing, I need the data in a string. I can move the individual characters from the array to a string, but I'm thinking there must be an easier way to to this. Any help?
  • *Experts*
Posted

If you want to just read the whole file you can use the ReadToEnd() method. Then searching the string that you got for specific things shouldnt be hard using the methods that the String Object provides. Do you have any more specific questions about this?

:)

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...