Compartilhar via


IEnumerableExtensions.DistinctArray<TSource> Method

Definition

Returns a distinct array.

public static TSource[] DistinctArray<TSource> (this System.Collections.Generic.IEnumerable<TSource> source, System.Collections.Generic.IEqualityComparer<TSource> comparer = default);
static member DistinctArray : seq<'Source> * System.Collections.Generic.IEqualityComparer<'Source> -> 'Source[]
<Extension()>
Public Function DistinctArray(Of TSource) (source As IEnumerable(Of TSource), Optional comparer As IEqualityComparer(Of TSource) = Nothing) As TSource()

Type Parameters

TSource

The type of the source.

Parameters

source
IEnumerable<TSource>

The source.

comparer
IEqualityComparer<TSource>

The comparer.

Returns

TSource[]

Applies to