We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Groups items in the sequence while they have same grouping key.
Namespace: CodeJam.CollectionsAssembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public static IEnumerable<IGrouping<TKey, T>> GroupWhileEquals<T, TKey>( this IEnumerable<T> source, Func<T, TKey> keySelector )
VB
<ExtensionAttribute> Public Shared Function GroupWhileEquals(Of T, TKey) ( source As IEnumerable(Of T), keySelector As Func(Of T, TKey) ) As IEnumerable(Of IGrouping(Of TKey, T))
F#
[<ExtensionAttribute>] static member GroupWhileEquals : source : IEnumerable<'T> * keySelector : Func<'T, 'TKey> -> IEnumerable<IGrouping<'TKey, 'T>>
Type: IEnumerable(IGrouping(TKey, T))Grouped items with grouping key.
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable(T). 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).
EnumerableExtensions ClassGroupWhileEquals OverloadCodeJam.Collections Namespace