Click or drag to resize

ExtensionsDistinctTSource Method

Returns distinct elements from a sequence by using a selector to compare values.

Namespace:  Cauldron
Assembly:  Cauldron (in Cauldron.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static IEnumerable<TSource> Distinct<TSource>(
	this IEnumerable<TSource> source,
	Func<TSource, TSource, bool> selector
)

Parameters

source
Type: System.Collections.GenericIEnumerableTSource
The sequence to remove duplicate elements from.
selector
Type: SystemFuncTSource, TSource, Boolean
An expression used to determines whether the specified object are equal

Type Parameters

TSource
The type of the elements of source

Return Value

Type: IEnumerableTSource
An IEnumerableT that contains distinct elements from the source sequence.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableTSource. 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