public static void WriteSByte(sbyte value, ByteArray array)
 {
     if (!array.HasNext())
     {
         throw new ArgumentOutOfRangeException();
     }
     array.Write((byte)value);
 }
Exemplo n.º 2
0
 public static sbyte ReadSByte(ByteArray array)
 {
     if (!array.HasNext())
     {
         throw new IndexOutOfRangeException();
     }
     return((sbyte)array.Read());
 }
 public static void WriteBool(bool value, ByteArray array)
 {
     if (!array.HasNext())
     {
         throw new ArgumentOutOfRangeException();
     }
     array.Write((value ? (byte)1 : (byte)0));
 }