Aggregation Operators
Aggregation operators allow performing simple mathematic calculations on a sequence’s items using the Aggregate and Into clauses. The combination of such clauses can affect the following methods:
• Sum, which returns the sum of values of the specified property for each item in the collection
• Average, which returns the average calculation of values of the specified property for each item in the collection
• Count and LongCount, which return the number of items within a collection, respectively as Integer and Long types
• Min, which returns the lowest value for the specified sequence
• Max, which returns the highest value for the specified sequence
For example, you can get the sum of unit prices for your products as follows: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access