I need to read in a text file that can range from 8k to 5MB. This file is made up of a single line of text. No Carriage returns or End of Lines. I then need to break it down by to its individual pieces. Those pieces are delimited by size. For example, the first chuck of information is made up of 240 characters. In that 240 characters the first 30 are the Name field. The next 35 are the Address, and so on. Parsing aside, is the StreamReader class the best choice for reading it into memory?
Share
Look a the
TextFieldParserclass, though in theMicrosoft.VisualBasic.FileIOnamespace, it can easily be used with C#.The class description on MSDN is:
An example usage would be: