I have a byte array consist of 32 bytes. I want to read 4 bytes from index position 16 to 19. How can i point binary reader to start reading from index 16. I am trying these commands
byte[] trace ; // 32 byte array
using (FileStream s = File.OpenRead(filename))
using (BinaryReader r = new BinaryReader(s))
{
r.baseStream.Seek(position,SeekOrigin.Begin);
byte[] by = r.ReadBytes(4);
}
but i don't know what to put at position?