BinaryReader: PeekChar

PeekChar

Returns the next character to be decoded from the byte stream. The position in the stream is not advanced after the read.



 Public Function PeekChar ( ) As Long

Return Values

Long -  The next character to be Read, or -1 if no more characters are in the stream.

Remarks

This function requires the stream to support Seeking. If it does not, then -1 will always be returned.

Exceptions

Exception Condition
EndOfStreamExceptionThe end of the stream is reached.
ObjectDisposedExceptionThe stream is closed.
IOExceptionAn I/O error occurs.

See Also

Project CorLib Overview

Class BinaryReader Overview

ReadChar