Returns a grouping by the unique elements in a list
using the specified comparer to determine equality.
Namespace:
Extreme.DataAnalysis
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static Grouping<T> Group<T>(
this IList<T> keys,
IEqualityComparer<T> comparer
)
<ExtensionAttribute>
Public Shared Function Group(Of T) (
keys As IList(Of T),
comparer As IEqualityComparer(Of T)
) As Grouping(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static Grouping<T>^ Group(
IList<T>^ keys,
IEqualityComparer<T>^ comparer
)
[<ExtensionAttribute>]
static member Group :
keys : IList<'T> *
comparer : IEqualityComparer<'T> -> Grouping<'T>
Parameters
- keys
- Type: System.Collections.GenericIListT
A list. - comparer
- Type: System.Collections.GenericIEqualityComparerT
The comparer used to determine whether two keys are equal.
Type Parameters
- T
- The type of the elements of the list.
Return Value
Type:
GroupingTA grouping of the elements of
keys and
indexed by the unique elements in
keys.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IListT. 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).
Reference