AsyncEnumerable.Union<TSource> 方法

定义

生成两个序列的集并集。

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> 包含两个输入序列中的元素,不包括重复项。

例外

secondnull

适用于