C# Class MyEnumerable, code

Exibir arquivo Open project: shendongnian/code Class Usage Examples

Public Methods

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).

Method Details

GroupAdjacentBy() public static method

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 whose elements to group.
keySelector Func, A function to extract the key for each element.
return TSource>>.IEnumerable