IndexCollectionSequence Method |
Namespace: Novacta.Analytics
public static IndexCollection Sequence( int firstIndex, int increment, int indexBound )
Exception | Condition |
---|---|
ArgumentOutOfRangeException | firstIndex 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. |
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.