예제 #1
0
        public short ReadShort()
        {
            Check(2);
            ShortToByte block = new ShortToByte
            {
                Byte0 = _buffer[_position++],
                Byte1 = _buffer[_position++]
            };

            return(block.Value);
        }
예제 #2
0
        public void WriteShort(short value)
        {
            ShortToByte block = new ShortToByte()
            {
                Value = value
            };

            Grow(2);
            _buffer[_size++] = block.Byte0;
            _buffer[_size++] = block.Byte1;
        }