BinaryReader.PeekChar Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

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

Syntax

Public Overridable Function PeekChar As Integer
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.

Exceptions

Exception Condition
IOException

An I/O error occurs.

Remarks

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

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

BinaryReader Class

System.IO Namespace