AsyncEnumerable.Intersect<TSource> 方法

定义

生成两个序列的集交集。

public static System.Collections.Generic.IAsyncEnumerable<TSource> Intersect<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource> first, System.Collections.Generic.IAsyncEnumerable<TSource> second, System.Collections.Generic.IEqualityComparer<TSource>? comparer = default);
static member Intersect : System.Collections.Generic.IAsyncEnumerable<'Source> * System.Collections.Generic.IAsyncEnumerable<'Source> * System.Collections.Generic.IEqualityComparer<'Source> -> System.Collections.Generic.IAsyncEnumerable<'Source>
<Extension()>
Public Function Intersect(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>

包含构成两个序列集交集的元素的序列。

例外

secondnull

适用于