Beispiel #1
0
 public static uint ToUInt32LittleEndian(DelayedByteArray buffer, int offset)
 {
     return((uint)(((buffer[offset + 3] << 24) & 0xFF000000U) | ((buffer[offset + 2] << 16) & 0x00FF0000U)
                   | ((buffer[offset + 1] << 8) & 0x0000FF00U) | ((buffer[offset + 0] << 0) & 0x000000FFU)));
 }
Beispiel #2
0
 public static ushort ToUInt16LittleEndian(DelayedByteArray buffer, int offset)
 {
     return((ushort)(((buffer[offset + 1] << 8) & 0xFF00) | ((buffer[offset + 0] << 0) & 0x00FF)));
 }