Table of Contents

Class Range<TValue>

Namespace
Bonsai
Assembly
Bonsai.Core.dll

Represents a range of values defined by an inclusive lower and upper bounds.

public sealed class Range<TValue> : IEquatable<Range<TValue>>

Type Parameters

TValue

The type of values in the range.

Inheritance
Range<TValue>
Implements
IEquatable<Range<TValue>>
Inherited Members

Constructors

Range(TValue, TValue)

Initializes a new instance of the Range<TValue> class with the specified lower and upper bounds.

Range(TValue, TValue, IComparer<TValue>)

Initializes a new instance of the Range<TValue> class with the specified lower and upper bounds and using the specified comparer.

Properties

LowerBound

Gets the inclusive lower bound of the range.

UpperBound

Gets the inclusive upper bound of the range.

Methods

Contains(TValue)

Tests whether a specified value falls within the range.

Equals(Range<TValue>)

Returns a value indicating whether this instance has the same lower and upper bounds as a specified Range<TValue> object.

Equals(object)

Tests to see whether the specified object is a Range<TValue> object with the same lower and upper bounds as this Range<TValue> instance.

GetHashCode()

Returns a hash code for the current instance.

ToString()

Creates a string representation of this Range<TValue>.

Operators

operator ==(Range<TValue>, Range<TValue>)

Tests whether two Range<TValue> objects are equal.

operator !=(Range<TValue>, Range<TValue>)

Tests whether two Range<TValue> objects are different.