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
Collabora con noi su GitHub
L'origine di questo contenuto è disponibile in GitHub, in cui è anche possibile creare ed esaminare i problemi e le richieste pull. Per ulteriori informazioni, vedere la guida per i collaboratori.