BinaryReader.PeekChar Method

May 11, 2014

Returns the next available character and does not advance the byte or character position.

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

public virtual int PeekChar()

Return Value

Type: System.Int32
The next available character, or -1 if no more characters are available or the stream does not support seeking.

ExceptionCondition
IOException

An I/O error occurs.

If surrogate characters can be expected in the stream use the ReadChars method, then set the stream back to the original position.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft