Method Duplicates
View SourceDuplicates<TSource>(IAsyncEnumerable<TSource>, IEqualityComparer<TSource>?)
Returns all duplicate elements of the given source.
Declaration
public static IAsyncEnumerable<TSource> Duplicates<TSource>(this IAsyncEnumerable<TSource> source, IEqualityComparer<TSource>? comparer = null)
Parameters
Type | Name | Description |
---|---|---|
IAsyncEnumerable<TSource> | source | The source sequence. |
IEqualityComparer<TSource> | comparer | The equality comparer to use to determine whether one |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TSource> | All elements that are duplicated. |
Type Parameters
Name | Description |
---|---|
TSource | The type of the elements in the source sequence. |
Remarks
This operator uses deferred execution and streams its results.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|