AsyncEnumerable.Cast<TResult>(IAsyncEnumerable<Object>) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將 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 別的元素。