AsyncEnumerable.Distinct<TSource> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns distinct elements from a sequence.
public static System.Collections.Generic.IAsyncEnumerable<TSource> Distinct<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, System.Collections.Generic.IEqualityComparer<TSource>? comparer = default);
static member Distinct : System.Collections.Generic.IAsyncEnumerable<'Source> * System.Collections.Generic.IEqualityComparer<'Source> -> System.Collections.Generic.IAsyncEnumerable<'Source>
<Extension()>
Public Function Distinct(Of TSource) (source As IAsyncEnumerable(Of TSource), Optional comparer As IEqualityComparer(Of TSource) = Nothing) As IAsyncEnumerable(Of TSource)
Type Parameters
- TSource
Parameters
- source
- IAsyncEnumerable<TSource>
The sequence to remove duplicate elements from.
- comparer
- IEqualityComparer<TSource>
An IEqualityComparer<T> to compare values.
Returns
IAsyncEnumerable<TSource>
An IAsyncEnumerable<T> that contains distinct elements from the source sequence.
Exceptions
source
is null
.
Applies to
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.