I am trying to randomly access a file but not fully understanding this class.
// Seek to the beginning of the field
System.IO.StreamReader srFile = new System.IO.StreamReader(_FileName.PathAndFileName);
// Read the field
int FieldLength = Field.FieldLength;
int BUFFER_SIZE = (int)RecordLength;
byte bBuffer = new Byte[BUFFER_SIZE];
srFile.BaseStream.Read(bBuffer, 0, (int)FieldLength);
FieldValue = bBuffer.ToString();
but bBuffer is numbers like:
and the value of FieldValue is "System.Byte"
I'm trying to get text as this is a text file.
View Complete Post