-
Notifications
You must be signed in to change notification settings - Fork 26
Distinct
Eugene Sadovoi edited this page Jul 7, 2016
·
1 revision
Returns distinct elements from a sequence by using a specified key selector to compare values.
Distinct<TSource>([keySelector])
A function to extract the key from each element of the sequence. This key is being used to determine uniqueness of the element: TKey keySelector(TSource)
An Enumerable that contains distinct elements from the source sequence.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated. The Distinct method returns an unordered sequence that contains no duplicate values. If keySelector is omitted, the sequence elements themselves are used as keys.