Category: LINQ & Collections
-
The essentials of the Aggregate method
The Aggregate method combines a sequence of elements into a single value. It does that by iterating over each one of them and calling a lambda function. This lambda function produces a result and carries it on to the next iteration. The simplest form The following example calculates the sum of some numbers: In comparison,…
