Aggregate Method
Learn how to apply a function to a collection carrying the result with the Aggregate method.
We'll cover the following...
How to perform an operation carrying the result
The Aggregate
method applies a function to a collection, carrying the result to the next element. It aggregates the result of a function. The Aggregate
method takes two parameters: a seed and an aggregating function that takes the accumulated value and one element from the collection.
On the first iteration, the Aggregate
method executes the aggregating function using the seed and the first element of the collection as ...