Table of Contents

Class Range<T>

Namespace
MongoDB.Driver.Core.Misc
Assembly
MongoDB.Driver.Core.dll

Represents a range between a minimum and a maximum value.

public sealed class Range<T> : IEquatable<Range<T>> where T : IComparable<T>

Type Parameters

T

The type of the value.

Inheritance
Range<T>
Implements
Inherited Members

Constructors

Range(T, T)

Initializes a new instance of the Range<T> class.

public Range(T min, T max)

Parameters

min T

The minimum value.

max T

The maximum value.

Properties

Max

Gets the maximum value.

public T Max { get; }

Property Value

T

The maximum value.

Min

Gets the minimum value.

public T Min { get; }

Property Value

T

The minimum value.

Methods

Equals(Range<T>)

public bool Equals(Range<T> other)

Parameters

other Range<T>

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Overlaps(Range<T>)

Determines whether this range overlaps with another range.

public bool Overlaps(Range<T> other)

Parameters

other Range<T>

The other range.

Returns

bool

True if this range overlaps with the other

ToString()

public override string ToString()

Returns

string