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

System.IO.StringReader.Peek Method

Returns the next available character but does not advance the reader's position in the underlying string. [Edit]

public override int Peek ()

Returns

The next character to be read as a int , or -1 if no more characters are available. [Edit]

Exceptions

TypeReason
ObjectDisposedExceptionThe current reader is closed. [Edit]

Remarks

The current position of the System.IO.StringReader is not changed by this operation.

Note:

This method returns -1 is when the end of the underlying string is reached because a Unicode character can contain only values between hexadecimal 0x0000 to 0xFFFF (0 to 65535).

This method overrides TextReader.Peek.

[Edit]

Requirements

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