The Sum operator collects all the numbers from the source sequence and emits a single value representing the sum of all numbers. The single result value is emitted only when the source sequence terminates successfully.
Examples
Use Sum to report the sum of all elements at the end of a sequence.
Related Operators
Use Accumulate instead to continuously track the running sum of values in the sequence.