Mono Class Library: System.IO.TextReader Overview | Members

System.IO.TextReader.Peek Method

Reads the next character without changing the state of the reader or the character source.

public virtual int Peek ()

Returns

The next character to be read, or -1 if no more characters are available.

Exceptions

TypeReason
System.IO.IOExceptionAn I/O error has occurred.

Remarks

The position of the System.IO.TextReader in the source is not changed by this operation.

Operation
As described above.

The default implementation returns -1.

Requirements

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