jspeirer Posted September 19, 2003 Posted September 19, 2003 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? Quote
*Experts* mutant Posted September 19, 2003 *Experts* Posted September 19, 2003 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? :) Quote
jspeirer Posted September 19, 2003 Author Posted September 19, 2003 No, I think that we've got it covered. Thanks for your help. Quote
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.