Returns distinct elements from a sequence by using a specified
IEqualityComparer T to compare values.
Namespace: SequencesAssembly: Sequences (in Sequences.dll) Version: 1.0.1.0 (1.0.1)
Syntax public static ISequence<TSource> Distinct<TSource>(
this ISequence<TSource> source,
IEqualityComparer<TSource> comparer
)
public static ISequence<TSource> Distinct<TSource>(
this ISequence<TSource> source,
IEqualityComparer<TSource> comparer
)
<ExtensionAttribute>
Public Shared Function Distinct(Of TSource) (
source As ISequence(Of TSource),
comparer As IEqualityComparer(Of TSource)
) As ISequence(Of TSource)
<ExtensionAttribute>
Public Shared Function Distinct(Of TSource) (
source As ISequence(Of TSource),
comparer As IEqualityComparer(Of TSource)
) As ISequence(Of TSource)
public:
[ExtensionAttribute]
generic<typename TSource>
static ISequence<TSource>^ Distinct(
ISequence<TSource>^ source,
IEqualityComparer<TSource>^ comparer
)
public:
[ExtensionAttribute]
generic<typename TSource>
static ISequence<TSource>^ Distinct(
ISequence<TSource>^ source,
IEqualityComparer<TSource>^ comparer
)
static member Distinct :
source : ISequence<'TSource> *
comparer : IEqualityComparer<'TSource> -> ISequence<'TSource>
static member Distinct :
source : ISequence<'TSource> *
comparer : IEqualityComparer<'TSource> -> ISequence<'TSource>
Parameters
- source
- Type: Sequences ISequence TSource
The sequence to remove duplicate elements from.
- comparer
- Type: System.Collections.Generic IEqualityComparer TSource
An IEqualityComparer T to compare elements.
Type Parameters - TSource
- The type of the elements of source.
Return Value
Type:
ISequence TSource A sequence that contains distinct elements from the input sequence.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ISequence TSource . When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also