Пример #1
0
 public static void WriteIntToByteArray(byte[] array, ref int position, int value)
 {
     Buffer.BlockCopy(BitConverter.GetBytes(value), 0, array, position, 4);
     position += 4;
 }
Пример #2
0
 public static void WriteUShortToByteArray(byte[] array, ref int position, ushort value)
 {
     Buffer.BlockCopy(BitConverter.GetBytes(value), 0, array, position, 2);
     position += 2;
 }