Click or drag to resize

IndexCollectionSequence Method

Initializes a new instance of the IndexCollection class that contains a sequence of evenly spaced elements.

Namespace:  Novacta.Analytics
Assembly:  Novacta.Analytics (in Novacta.Analytics.dll) Version: 2.0.0
Syntax
public static IndexCollection Sequence(
	int firstIndex,
	int increment,
	int indexBound
)

Parameters

firstIndex
Type: SystemInt32
The first index of the sequence.
increment
Type: SystemInt32
The amount which increments the elements in the sequence.
indexBound
Type: SystemInt32
The value by which the sequence is bounded.

Return Value

Type: IndexCollection
The collection of indexes in the specified sequence.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionfirstIndex is negative.
-or-
indexBound is negative.
-or-
increment is zero.
-or-
increment is positive and indexBound is less than firstIndex.
-or-
increment is negative and firstIndex is less than indexBound.
Remarks

The firstIndex is always added to the collection. Additional indexes are included by repeatedly adding increment to firstIndex.

How the sequence stops growing depends upon the sign of increment. If increment is positive, then the sequence stops if an incremented value is greater than indexBound. If increment is negative, additional indexes are included in the sequence if they are less than or equal to indexBound.

See Also