Skip to content

Latest commit

 

History

History
35 lines (20 loc) · 1.27 KB

groupings.md

File metadata and controls

35 lines (20 loc) · 1.27 KB

LINQ - Grouping Operators

The group by and into keywords provide grouping constructs to organize elements of the input sequence into buckets.

Group by into buckets

This sample demonstrates the use of group by and into to create buckets based on the remainder of an integer when dividing it by 5.

Groupby using a property

This sample uses group by to partition a list of words by their first letter.

Grouping using a key property

This sample uses group by to partition a list of products by category.

Nested group by queries

This sample demonstrates the use of group by and into nested buckets of orders by customer, year, and month. The result

Next: Grouping with a custom comparer » Previous: Nested custom comparisons «

Home