IAsyncEnumerator<T>.MoveNextAsync(CancellationToken) Method

Definition

Advances the enumerator to the next element of the enumerator.

public System.Threading.Tasks.Task<bool> MoveNextAsync (System.Threading.CancellationToken cancellationToken);
abstract member MoveNextAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>

Parameters

cancellationToken
System.Threading.CancellationToken

The token to monitor for cancellation requests.

Returns

System.Threading.Tasks.Task<System.Boolean>

true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.

Exceptions

System.InvalidOperationException

The collection was modified after the enumerator was created.

Applies to