Method | Description | |
---|---|---|
GroupAdjacentBy ( IEnumerable, source, Func, keySelector ) : TSource>>.IEnumerable |
Cuts a sequence into groups according to a specified key selector function. Similar to GroupBy, but only groups adjacent items. Reduces a collection a,a,B,B,B,a,p,p,p,p to (a,a),(B,B,B),(a),(p,p,p,p).
|
public static GroupAdjacentBy ( IEnumerable, source, Func, keySelector ) : TSource>>.IEnumerable |
||
source | IEnumerable, | An |
keySelector | Func, | A function to extract the key for each element. |
return | TSource>>.IEnumerable |