Click or drag to resize

RankedSetTElementsBetweenIndexes Method

Returns an enumerator that iterates over a range with the supplied index bounds.

Namespace:  Kaos.Collections
Assembly:  KaosCollections (in KaosCollections.dll) Version: 4.2.0.0
Syntax
C#
public IEnumerable<T> ElementsBetweenIndexes(
	int lowerIndex,
	int upperIndex
)

Parameters

lowerIndex
Type: SystemInt32
Minimum index of the range.
upperIndex
Type: SystemInt32
Maximum index of the range.

Return Value

Type: IEnumerableT
An enumerator for the specified index range.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionWhen lowerIndex is less than zero or not less than Count.
ArgumentOutOfRangeExceptionWhen upperIndex is less than zero or not less than Count.
ArgumentExceptionWhen lowerIndex and upperIndex do not denote a valid range of indexes.
InvalidOperationExceptionWhen the set was modified after the enumerator was created.
Remarks

Index bounds are inclusive.

Retrieving the initial item is a O(log n) operation. Retrieving each subsequent item is a O(1) operation.

See Also