/// <summary> /// Reads <c>short</c> from the stream. /// </summary> public unsafe short ReadShort() { if (blockRemaining > 2) { position += 2; blockRemaining -= 2; return(BaseReader.ReadShort()); } else { short value; ReadBytes((byte *)&value, 2); return(value); } }
/// <summary> /// Reads <c>short</c> from the stream. /// </summary> public short ReadShort() { byte[] buffer = MoveInternal(2); short value; if (buffer != null) { value = BitConverter.ToInt16(buffer, 0); } else { value = BaseReader.ReadShort(); } CheckMoveReader(); return(value); }