Enumerable.sum Method

Computes the sum of the sequence of values that are obtained by invoking a transform function on each element of the input sequence.
 
 
Static This method is static.

Parameters

source

Type: IEnumerable
A sequence of values to calculate the sum of.
selector

Type: Function
A transform function to apply to each element.
Optional: True

Return Value


Type: Number
The sum of the projected values.