Click or drag to resize

CondensedCollectionExtensionsAverageTSource Method (CondensedCollectionTSource, FuncTSource, NullableInt64)

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

Computes the average of a CondensedCollection of nullable Int64 values that are obtained by invoking a transform function on each element of the input sequence. 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<double> Average<TSource>(
	this CondensedCollection<TSource> source,
	Func<TSource, Nullable<long>> selector
)

Parameters

source
Type: CondensedCondensedCollectionTSource
A CondensedCollection of values to calculate the average of.
selector
Type: SystemFuncTSource, NullableInt64
A transform function to apply to each element.

Type Parameters

TSource
The type of the elements of source.

Return Value

Type: NullableDouble
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 CondensedCollectionTSource. 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 or selector is null
OverflowExceptionThe sum of the elements in the sequence is larger than Int64.MaxValue.
Remarks
See Also