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
Spolupracujte s námi na GitHubu
Zdroj tohoto obsahu najdete na GitHubu, kde můžete také vytvářet a kontrolovat problémy a žádosti o přijetí změn. Další informace najdete v našem průvodci pro přispěvatele.