ContiguousNonNegativeIntegerRange Type

Represents a range of consecutive non-negative integers.

Constructors

Constructor Description

ContiguousNonNegativeIntegerRange(start, count)

Full Usage: ContiguousNonNegativeIntegerRange(start, count)

Parameters:
    start : int - First element belonging to the range.
    count : int - Number of consecutive integers belonging to the range.

Constructs an integer range from the first element and the number of element of the range.

start : int

First element belonging to the range.

count : int

Number of consecutive integers belonging to the range.

ContiguousNonNegativeIntegerRange(from)

Full Usage: ContiguousNonNegativeIntegerRange(from)

Parameters:

Constructs an integer range from another integer range.

from : IContiguousIntegerRange

The integer range to copy from.

Instance members

Instance member Description

this.Clone

Full Usage: this.Clone

Returns: obj
Modifiers: abstract

Returns: obj

this.Contains

Full Usage: this.Contains

Parameters:
    nValue : int

Returns: bool
Modifiers: abstract

nValue : int
Returns: bool

this.Count

Full Usage: this.Count

Returns: int
Modifiers: abstract

Number of elements of the integer range.Thus the integer range contains Start, Start+1, .. Start+Count-1.

Returns: int

this.End

Full Usage: this.End

Returns: int

Element immmediately after the last valid element (is equal to ContiguousNonNegativeIntegerRange.Start+ContiguousNonNegativeIntegerRange.Count).

Returns: int

this.IsEmpty

Full Usage: this.IsEmpty

Returns: bool

Returns true if the range is empty, i.e. has no elements.

Returns: bool

this.IsInfinite

Full Usage: this.IsInfinite

Returns: bool

Returns true if the integer range is infinite.

Returns: bool

this.[arg1]

Full Usage: this.[arg1]

Parameters:
    arg0 : int

Returns: int
Modifiers: abstract

arg0 : int
Returns: int

this.Last

Full Usage: this.Last

Returns: int

Last valid element of the integer range (is equal to ContiguousNonNegativeIntegerRange.Start+ContiguousNonNegativeIntegerRange.Count-1).

Returns: int

this.RangesAscending

Full Usage: this.RangesAscending

Returns: IEnumerable<ContiguousIntegerRange>
Modifiers: abstract

Returns: IEnumerable<ContiguousIntegerRange>

this.RangesDescending

Full Usage: this.RangesDescending

Returns: IEnumerable<ContiguousIntegerRange>
Modifiers: abstract

Returns: IEnumerable<ContiguousIntegerRange>

this.Start

Full Usage: this.Start

Returns: int
Modifiers: abstract

Start value of the integer range.

Returns: int

Static members

Static member Description

ContiguousNonNegativeIntegerRange.Empty

Full Usage: ContiguousNonNegativeIntegerRange.Empty

Returns: ContiguousNonNegativeIntegerRange

Gets a standard empty integer range (ContiguousNonNegativeIntegerRange.Start and ContiguousNonNegativeIntegerRange.Count set to zero).

Returns: ContiguousNonNegativeIntegerRange

ContiguousNonNegativeIntegerRange.NewFromStartAndCount(start, count)

Full Usage: ContiguousNonNegativeIntegerRange.NewFromStartAndCount(start, count)

Parameters:
    start : int - First element belonging to the range.
    count : int - Number of consecutive integers belonging to the range.

Returns: ContiguousNonNegativeIntegerRange Newly constructed integer range.

Constructs an integer range from the first element and the number of element of the range.

start : int

First element belonging to the range.

count : int

Number of consecutive integers belonging to the range.

Returns: ContiguousNonNegativeIntegerRange

Newly constructed integer range.

ContiguousNonNegativeIntegerRange.NewFromStartAndEnd(start, end)

Full Usage: ContiguousNonNegativeIntegerRange.NewFromStartAndEnd(start, end)

Parameters:
Returns: ContiguousNonNegativeIntegerRange Newly constructed integer range.

Constructs an integer range from the first element and the element following immediately after the last element.

start : int

First element belonging to the range.

end : int

Element following immediately after the last element, i.e. ContiguousNonNegativeIntegerRange.Last+1.

Returns: ContiguousNonNegativeIntegerRange

Newly constructed integer range.

ContiguousNonNegativeIntegerRange.NewFromStartAndLast(start, last)

Full Usage: ContiguousNonNegativeIntegerRange.NewFromStartAndLast(start, last)

Parameters:
    start : int - First element belonging to the range.
    last : int - Last element belonging to the range.

Returns: ContiguousNonNegativeIntegerRange Newly constructed integer range.

Constructs an integer range from the first and the last element of the range.

start : int

First element belonging to the range.

last : int

Last element belonging to the range.

Returns: ContiguousNonNegativeIntegerRange

Newly constructed integer range.

ContiguousNonNegativeIntegerRange.NewFromStartToInfinity(start)

Full Usage: ContiguousNonNegativeIntegerRange.NewFromStartToInfinity(start)

Parameters:
    start : int - First element belonging to the range.

Returns: ContiguousNonNegativeIntegerRange Newly constructed integer range.

Constructs an infinitely extended integer range.

start : int

First element belonging to the range.

Returns: ContiguousNonNegativeIntegerRange

Newly constructed integer range.