RangeT Structure

Creates a minimal IRangeT implementation for any class that implements IComparableT

Definition

Namespace: InnerDrive.Core
Assembly: InnerDrive.Core (in InnerDrive.Core.dll) Version: 5.2.9017.0
C#
public readonly struct Range<T> : IRange<T>, 
	IComparable, IComparable<Range<T>>, IEquatable<Range<T>>
where T : Object, IComparable<T>
Inheritance
Object    ValueType    RangeT
Implements
IRangeT, IComparable, IComparableRangeT, IEquatableRangeT

Type Parameters

T
The type parameter to use

Constructors

RangeT(IEnumerableT) Creates a new instance of DateRange from a generic list of DateTime values.
RangeT(IRangeT) Creates a new instance of RangeT from an existing range value.
RangeT(T, T, Boolean, Boolean) Creates a new instance of RangeT

Properties

IsLowerInclusive If true, the range includes the Lower value. Otherwise, values equal to or less than the Lower value are out of the range.
IsUpperInclusive If true, the range includes the Upper value. Otherwise, values equal to or greater than the Upper value are out of the range.
Lower Gets or sets the lowest value in the range.
Upper Gets or sets the highest value in the range.

Methods

CompareTo(Object) Compares this instance to a specified Object and returns an indication of their relative values.
CompareTo(T) Compares this instance to a specified DateTimeOffset structure and returns an indication of their relative values.
CompareTo(RangeT)Defines a generalized comparison method that a value type or class implements to create a type-specific comparison method for ordering or sorting its instances.
Contains(IRangeT) Returns true if the given RangeT is contained within this range.
Contains(T) Returns true if the given range is contained within this range.
Equals(Object)Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object))
Equals(RangeT) Determines whether the specified RangeT is equal to the current RangeT.
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeReturns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Overlaps(IRangeT) Returns true if the given range is partially contained within this range.
Overlaps(RangeT) Returns true if the given RangeT is partially contained within this RangeT.
ToStringReturns the fully qualified type name of this instance.
(Overrides ValueTypeToString)

Operators

Equality(RangeT, RangeT) Compares two instances of RangeT for equality.
GreaterThan(RangeT, RangeT) Determines whether one RangeT is greater than another.
Inequality(RangeT, RangeT) Compares two instances of RangeT for inequality.
LessThan(RangeT, RangeT) Determines whether one RangeT is less than another.

See Also