SumBy
Returns the sum of a collection, after mapping each element to a value using the provided function.
- Use
IEnumerable.Select()to map each element of either collection to adouble,IEnumerable.Sum()to sum the values.
Returns the sum of a collection, after mapping each element to a value using the provided function.
IEnumerable.Select() to map each element of either collection to a double, IEnumerable.Sum() to sum the values.