Click or drag to resize

AscendingIntegerCollectionGetNextRangeDescending Method

Get the next range (i.e. a contiguous range of integers) in descending order.

Namespace: Altaxo.Collections
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public bool GetNextRangeDescending(
	ref int currentposition,
	out ContiguousIntegerRange result
)

Parameters

currentposition  Int32
The current position into this collection. Use Count-1 for the first time. On return, this is the next position.
result  ContiguousIntegerRange
Returns the next contiguous interger range if the return value is true.

Return Value

Boolean
True if the range data are valid, false if there is no more data. Used as end-of-loop indicator.
Remarks
You can use this function in a while loop:
C#
int rangestart, rangecount;
int currentPosition=selection.Count-1;
while(selection.GetNextRangeAscending(currentPosition,out rangestart, out rangecount))
  {
  // do your things here
  }
See Also