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
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา