BinaryReader.Read Method

May 11, 2014

Reads characters from the underlying stream and advances the current position of the stream in accordance with the Encoding used and the specific character being read from the stream.

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)

public virtual int Read()

Return Value

Type: System.Int32
The next character from the input stream, or -1 if no characters are currently available.

ExceptionCondition
IOException

An I/O error occurs.

ObjectDisposedException

The stream is closed.

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

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft