The C# SelectBoundary Enumeration

SelectBoundary specifies how the lower and upper limits of an OrderedSequence<T> range search are interpreted.

For an overview, see the OrderedSequence page

Definition

    public enum SelectBoundary
    {
        Open,
        Inclusive,
        Exclusive
    }

Member Descriptions

SelectBoundary enumeration
Defines the boundary mode used by OrderedSequence<T>.Search() for the low and high ends of a search interval.
Open
The corresponding boundary value is not specified and is ignored by the search. Use this value for an open-ended interval on that side.
Inclusive
The specified boundary value is included in the search interval.
Exclusive
The specified boundary value is excluded from the search interval.
Typical Usage
Use Inclusive for closed ranges such as [low, high], Exclusive for strict comparisons, and Open when only one side of the range is constrained.
Examples
Search(10, SelectBoundary.Inclusive, 20, SelectBoundary.Exclusive) selects values in the half-open interval [10, 20). Search(0, SelectBoundary.Open, high, SelectBoundary.Inclusive) selects everything up to and including high.