OccurrenceIndex property

int get OccurrenceIndex
Gets or sets the index of the occurrence. Note that the occurrence index starts at one not zero.

Implementation

int get OccurrenceIndex => occurrenceIndex;
set OccurrenceIndex (int value)

Implementation

set OccurrenceIndex(int value) {
  // The occurrence index has to be positive integer.
  if (value < 1) {
    throw ArgumentException("OccurrenceIndexMustBeGreaterThanZero");
  }

  occurrenceIndex = value;
}