Click or drag to resize

CondensedCollectionExtensionsAverage Method (CondensedCollectionNullableDecimal)

[This is preliminary documentation and is subject to change.]

Computes the average of a sequence of nullable Decimal values. Optimized for a CondensedCollection.

Namespace:  Condensed.Linq
Assembly:  Condensed (in Condensed.dll) Version: 0.1.0.0 (0.1.0.0)
Syntax
public static Nullable<decimal> Average(
	this CondensedCollection<Nullable<decimal>> source
)

Parameters

source
Type: CondensedCondensedCollectionNullableDecimal
A CondensedCollection of nullable Decimal values to calculate the average of.

Return Value

Type: NullableDecimal
The average of the sequence of values, or null if the source sequence is empty or contains only values that are null.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type CondensedCollectionNullableDecimal. 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).
Exceptions
ExceptionCondition
ArgumentNullExceptionsource is null
OverflowExceptionThe sum of the elements in the sequence is larger than Decimal.MaxValue.
Remarks
See Also