Edit

Share via


AsyncEnumerable.Cast<TResult>(IAsyncEnumerable<Object>) Method

Definition

Casts the elements of an IAsyncEnumerable<T> to the specified type.

C#
public static System.Collections.Generic.IAsyncEnumerable<TResult> Cast<TResult>(this System.Collections.Generic.IAsyncEnumerable<object?> source);

Type Parameters

TResult

The type to cast the elements of source to.

Parameters

source
IAsyncEnumerable<Object>

The IAsyncEnumerable<T> that contains the elements to be cast to type TResult.

Returns

IAsyncEnumerable<TResult>

An IAsyncEnumerable<T> that contains each element of the source sequence cast to the TResult type.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided), 10
.NET Standard 2.0 (package-provided)