AsyncEnumerable.Cast<TResult>(IAsyncEnumerable<Object>) 方法

定义

IAsyncEnumerable<T> 的元素强制转换为指定类型。

public:
generic <typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ Cast(System::Collections::Generic::IAsyncEnumerable<System::Object ^> ^ source);
public static System.Collections.Generic.IAsyncEnumerable<TResult> Cast<TResult>(this System.Collections.Generic.IAsyncEnumerable<object?> source);
static member Cast : System.Collections.Generic.IAsyncEnumerable<obj> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function Cast(Of TResult) (source As IAsyncEnumerable(Of Object)) As IAsyncEnumerable(Of TResult)

类型参数

TResult

要将源元素强制转换为的类型。

参数

source
IAsyncEnumerable<Object>

IAsyncEnumerable<T>包含要强制转换为类型的TResult元素的元素。

返回

IAsyncEnumerable<TResult>

一个 IAsyncEnumerable<T> 包含源序列的每个元素转换为 TResult 该类型。

适用于