AsyncEnumerable.OfType<TResult>(IAsyncEnumerable<Object>) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
筛选基于指定类型的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输入序列中的元素。