CollectionExtensionsDistinctByTSource, TKey Method
Returns only the elements whose keys are distinct.
Namespace: Gemstone.Collections.CollectionExtensionsAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.110 -- Release Build+3e0464f4461df4d3e1175b13966eb47ff832554d
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(
this IEnumerable<TSource> source,
Func<TSource, TKey> keySelector,
bool forwardSearch = true
)
JavaScript does not support generic types or methods.
- source IEnumerableTSource
- The collection of source objects.
- keySelector FuncTSource, TKey
- The function used to access the keys of the source objects.
- forwardSearch Boolean (Optional)
- true to search forward in source; otherwise false to search backwards.
- TSource
- The type of the source objects in the collection.
- TKey
- The type of the keys to be compared.
IEnumerableTSourceThe elements from
source whose keys are distinct.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).