ValuesLinqMathExtensionsSumTSource Method
Computes the sum of a values in a collection.
Namespace: Fluent.Calculations.Primitives.CollectionsAssembly: Fluent.Calculations.Primitives (in Fluent.Calculations.Primitives.dll) Version: 1.1.0-aplha
public static TSource Sum<TSource>(
this IValuesProvider<TSource> source
)
where TSource : class, new(), IValueProvider
- source IValuesProviderTSource
- A sequence of values to calculate the sum of.
- TSource
- Type of collection items.
TSourceNew value of TSource type representing the sum of the values in the sequence.In Visual Basic and C#, you can call this method as an instance method on any object of type
IValuesProviderTSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Computation is based on Primitive property of the individual value objects.