Struct LinearRangeSpan<T>
Represents the value of a LinearRange<T>.
public readonly struct LinearRangeSpan<T> : IEquatable<LinearRangeSpan<T>>
Type Parameters
TThe data type of the underlying option.
- Implements
- Inherited Members
Remarks
A span is one of four kinds: None, LeftBounded, RightBounded, or Closed.
To create an empty span, use Empty. To create a closed span between two bounds, use the corresponding constructor and pass the option indices and data values for both ends.
StartIndex and EndIndex are option indices into Options;
they are -1 when not relevant for the current Kind.
Constructors
- LinearRangeSpan(LinearRangeSpanKind, T?, T?, int, int)
Initializes a new instance of LinearRangeSpan<T>.
Properties
- End
Gets the end data value (meaningful when Kind is LeftBounded or Closed).
- Kind
Gets the kind of span.
- Start
Gets the start data value (meaningful when Kind is RightBounded or Closed).
- StartIndex
Gets the index of Start in the options list, or
-1.