Duration (Pacific Standard Time):
To (Pacific Standard Time):
Impact:
  • None
User Action:
  • None

Enumerable.GroupBy Method

 

Groups the elements of a sequence.

Namespace:   System.Linq
Assembly:  System.Core (in System.Core.dll)

Name Description
System_CAPS_pubmethod System_CAPS_static GroupBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)

Groups the elements of a sequence according to a specified key selector function.

System_CAPS_pubmethod System_CAPS_static GroupBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>, IEqualityComparer<TKey>)

Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.

System_CAPS_pubmethod System_CAPS_static GroupBy<TSource, TKey, TElement>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TElement>)

Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function.

System_CAPS_pubmethod System_CAPS_static GroupBy<TSource, TKey, TElement>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TElement>, IEqualityComparer<TKey>)

Groups the elements of a sequence according to a key selector function. The keys are compared by using a comparer and each group's elements are projected by using a specified function.

System_CAPS_pubmethod System_CAPS_static GroupBy<TSource, TKey, TResult>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TKey, IEnumerable<TSource>, TResult>)

Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.

System_CAPS_pubmethod System_CAPS_static GroupBy<TSource, TKey, TResult>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TKey, IEnumerable<TSource>, TResult>, IEqualityComparer<TKey>)

Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. The keys are compared by using a specified comparer.

System_CAPS_pubmethod System_CAPS_static GroupBy<TSource, TKey, TElement, TResult>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TElement>, Func<TKey, IEnumerable<TElement>, TResult>)

Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. The elements of each group are projected by using a specified function.

System_CAPS_pubmethod System_CAPS_static GroupBy<TSource, TKey, TElement, TResult>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TElement>, Func<TKey, IEnumerable<TElement>, TResult>, IEqualityComparer<TKey>)

Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. Key values are compared by using a specified comparer, and the elements of each group are projected by using a specified function.

Return to top