System.IO.BinaryReader.PeekChar Method

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

Syntax

public virtual int PeekChar ()

Returns

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

Remarks

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

For a list of common I/O tasks, see Common I/O Tasks.

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0