AsyncEnumerable.Except<TSource> 方法

定义

生成两个序列的集差异。

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

适用于