EnumerableExtensionsSum(IEnumerableNullableUBinarySize) Method

Computes the sum of a sequence of nullable UBinarySize values.

Definition

Namespace: Ookii
Assembly: Ookii.BinarySize (in Ookii.BinarySize.dll) Version: 1.2.0+20f0bdf981c7baf115c68ccab612b1a031efcb4d
C#
public static UBinarySize? Sum(
	this IEnumerable<UBinarySize?> source
)

Parameters

source  IEnumerableNullableUBinarySize
A sequence of nullable UBinarySize values to calculate the sum of.

Return Value

NullableUBinarySize
The sum 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 IEnumerableNullableUBinarySize. 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

Items in source that are are excluded from the computation of the sum. This method returns zero if source contains no elements or all elements are .

Exceptions

ArgumentNullExceptionsource is .
OverflowException The sum is larger than UBinarySizeMaxValue.

See Also