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

定义

筛选基于指定类型的TResult元素IAsyncEnumerable<T>

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

类型参数

TResult

要筛选序列元素的类型。

参数

source
IAsyncEnumerable<Object>

IAsyncEnumerable<T>要筛选的元素。

返回

IAsyncEnumerable<TResult>

一个 IAsyncEnumerable<T> 包含类型 TResult输入序列中的元素。

适用于