IAsyncEnumerator<T> Interface

Definition

Supports a simple asynchronous iteration over a generic collection.

C#
public interface IAsyncEnumerator<out T> : IAsyncDisposable

Type Parameters

T

The type of objects to enumerate.

This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
Implements

Properties

Current

Gets the element in the collection at the current position of the enumerator.

Methods

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

(Inherited from IAsyncDisposable)
MoveNextAsync()

Advances the enumerator asynchronously to the next element of the collection.

Extension Methods

ConfigureAwait(IAsyncDisposable, Boolean)

Configures how awaits on the tasks returned from an async disposable will be performed.

Applies to

Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Standard 2.0 (package-provided), 2.1