示例#1
0
 protected int GetInt(byte left, byte right)
 {
     byte[] bytes = new byte[2];
     bytes[0] = left;
     bytes[1] = right;
     Bits bits = new Bits(bytes);
     return bits.ToInt();
 }
示例#2
0
 private byte[] FromInt(int val)
 {
     Bits bits = new Bits(val, 16);
     byte[] bytes = bits.ToBytes();
     byte[] newBytes = new byte[2];
     newBytes[0] = bytes[1];
     newBytes[1] = bytes[0];
     return newBytes;
 }
示例#3
0
 protected byte[] FromInt(int val)
 {
     Bits bits = new Bits(val, 16);
     return bits.ToBytes();
 }
        protected byte[] FromInt(int val)
        {
            Bits bits = new Bits(val, 16);

            return(bits.ToBytes());
        }