BinaryReader: ReadInt16

ReadInt16

Reads an 2-byte signed integer from the current stream and advances the current position of the stream by two bytes.



 Public Function ReadInt16 ( ) As Integer

Return Values

Integer -  An 2-byte signed integer read from the current stream.

Remarks

BinaryReader does not restore the file position after an unsuccessful read.

BinaryReader reads this data type in little-endian format.

Exceptions

Exception Condition
EndOfStreamExceptionThe end of the stream is reached.
ObjectDisposedExceptionThe stream is closed.
IOExceptionAn I/O error occurs.

See Also

Project CorLib Overview

Class BinaryReader Overview