ValuesLinqMathExtensionsAverageTSource Method
Computes the average 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 Average<TSource>(
this IValuesProvider<TSource> source
)
where TSource : class, new(), IValueProvider
- source IValuesProviderTSource
- A sequence of values to calculate the average of.
- TSource
- Type of collection items.
TSourceNew value of TSource type representing the avaerage 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.