Tim2Be,
I assume that records are not delimited by end of line characters, etc.,
in which case, you would want to use a System.IO.FileStream and read
20 bytes at a time using its Read() method. You'll read into a byte[]
and if necessary convert it to a string or whatever you need.
If you are dealing with a text file then in the simplest case, use
File.OpenText() to get a StreamReader and call the ReadLine() method.
That should get you pointed in the right direction.
--Bob
Tim2Be wrote:
I have a text file that has a length of 840 bytes. I need to split into 20
bytes starting from byte 1. If there are data in any of the 20 bytes, I
display the data. So there are 42 occurences of 20 bytes. How do I read each
of the 20 bytes and display the data in C#?