Skip to content

PeekableStream.EndOfStreamAsync Method ​

Definition ​

Asynchronously determines whether the end of the stream has been reached.

c#
public ValueTask<bool> EndOfStreamAsync(CancellationToken cancellationToken = null);

Parameters ​

NameTypeDescription
cancellationTokenCancellationTokenAn optional token to cancel the operation.

Returns ​

ValueTask<Boolean>

A task yielding true if the end of the stream has been reached; false otherwise.