ListExtrasDistinctByTSource, TKey Method |
Namespace: ANDREICSLIB.ClassExtrasAssembly: ANDREICSLIB (in ANDREICSLIB.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static IEnumerable<TSource> DistinctBy<TSource, TKey>(
this IEnumerable<TSource> source,
Func<TSource, TKey> keySelector
)
<ExtensionAttribute>
Public Shared Function DistinctBy(Of TSource, TKey) (
source As IEnumerable(Of TSource),
keySelector As Func(Of TSource, TKey)
) As IEnumerable(Of TSource)
public:
[ExtensionAttribute]
generic<typename TSource, typename TKey>
static IEnumerable<TSource>^ DistinctBy(
IEnumerable<TSource>^ source,
Func<TSource, TKey>^ keySelector
)
[<ExtensionAttribute>]
static member DistinctBy :
source : IEnumerable<'TSource> *
keySelector : Func<'TSource, 'TKey> -> IEnumerable<'TSource>
Parameters
- source
- Type: System.Collections.GenericIEnumerableTSource
- keySelector
- Type: SystemFuncTSource, TKey
Type Parameters
- TSource
- TKey
Return Value
Type:
IEnumerableTSourceUsage 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