AsyncEnumerable.Union<TSource> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
產生兩個序列的集合聯集。
public static System.Collections.Generic.IAsyncEnumerable<TSource> Union<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource> first, System.Collections.Generic.IAsyncEnumerable<TSource> second, System.Collections.Generic.IEqualityComparer<TSource>? comparer = default);
static member Union : System.Collections.Generic.IAsyncEnumerable<'Source> * System.Collections.Generic.IAsyncEnumerable<'Source> * System.Collections.Generic.IEqualityComparer<'Source> -> System.Collections.Generic.IAsyncEnumerable<'Source>
<Extension()>
Public Function Union(Of TSource) (first As IAsyncEnumerable(Of TSource), second As IAsyncEnumerable(Of TSource), Optional comparer As IEqualityComparer(Of TSource) = Nothing) As IAsyncEnumerable(Of TSource)
類型參數
- TSource
參數
- first
- IAsyncEnumerable<TSource>
一個 IAsyncEnumerable<T> 其不同元素組成聯集的第一集合。
- second
- IAsyncEnumerable<TSource>
一個 IAsyncEnumerable<T> 其不同元素組成聯集的第二集合。
- comparer
- IEqualityComparer<TSource>
還有 IEqualityComparer<T> 比較鑰匙。
傳回
IAsyncEnumerable<TSource>
包含 IAsyncEnumerable<T> 兩個輸入序列元素(排除重複序列)的 。
例外狀況
second 是 null。