Test additional content header

ValuesLinqMathExtensionsAverageTSource Method

Computes the average of a values in a collection.

Definition

Namespace: Fluent.Calculations.Primitives.Collections
Assembly: 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

Parameters

source  IValuesProviderTSource
A sequence of values to calculate the average of.

Type Parameters

TSource
Type of collection items.

Return Value

TSource
New value of TSource type representing the avaerage of the values in the sequence.

Usage Note

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).

Remarks

Computation is based on Primitive property of the individual value objects.

See Also