I think BinaryReader is what you want.
Something like this would be the equivalent (assuming data
is a byte array):
using (var stream = new MemoryStream(data)) {
using (var reader = new BinaryReader(stream)) {
stream.Seek(2, SeekOrigin.Begin);
var value1 = reader.ReadInt16();
var value2 = reader.ReadInt16();
}
}
This should skip the first 2 bytes, then load the next 4 bytes into two short
variables.