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

Latest commit

 

History

History
28 lines (16 loc) · 1.04 KB

aggregates-1.md

File metadata and controls

28 lines (16 loc) · 1.04 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.

Sum all numeric elements in a sequence

This sample uses Sum to get the total of the numbers in an array.

Sum a projection from a sequence

This sample uses Sum to get the total number of characters of all words in the array.

Sum all elements that are members of a group

This sample uses Sum to get the total units in stock for each product category.

Next: Aggregates-Min » Previous: Aggregates »

Home