Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Latest commit

 

History

History
36 lines (20 loc) · 1.27 KB

aggregates.md

File metadata and controls

36 lines (20 loc) · 1.27 KB

LINQ - Aggregators

Aggregator methods return a single value calculated from all the elements in a sequence. the aggregator methods include Count, Sum, Min, Max, Average, and Aggregate.

Count all elements in a sequence

This sample uses Count to get the number of unique factors of 300.

Count all elements matching a condition

This sample uses Count to get the number of odd ints in the array.

Count all elements nested in a query

This sample uses Count to return a list of customers and how many orders each has.

Count all elements that are members of a group

This sample uses Count to return a list of categories and how many products each has.

Next: Aggregates-Sum » Previous: Quantifiers »

Home