ArrayMath.Sum(Double[], Int32, Int32) Method

Computes the sum of the elements in a segment of an array.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static double Sum(
	this double[] array,
	int startIndex,
	int Length
)

Parameters

array  Double[]
A Double array.
startIndex  Int32
The zero-based index of the first element to be included in the sum.
Length  Int32
The length of the segment.

Return Value

Double
The sum of the specified elements in array.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Double[]. 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).

See Also