Skip to content

PeekableStream.Peek Method

Definition

Reads the next byte from the stream without consuming it. Subsequent calls to Peek() will return the same value until the byte is consumed by a read operation, or the position is changed.

public int Peek();

View source

Returns

Int32

The next byte in the stream, or -1 if the end of the stream has been reached.