Class Range<T>
Inheritance
System.Object
Range<T>
Implements
System.IEquatable<
Range<T>>
Assembly: NineDigit.eKasa.dll
Syntax
public class Range<T> : Object, IEquatable<Range<T>> where T : struct, IComparable, ValueType
Type Parameters
Constructors
Range()
Declaration
Range(IComparer<T>)
Declaration
public Range(IComparer<T> comparer)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IComparer<T> |
comparer |
|
Range(Nullable<T>, Nullable<T>)
Declaration
public Range(Nullable<T> from, Nullable<T> to)
Parameters
Type |
Name |
Description |
System.Nullable<T> |
from |
|
System.Nullable<T> |
to |
|
Range(Nullable<T>, Nullable<T>, IComparer<T>)
Declaration
public Range(Nullable<T> from, Nullable<T> to, IComparer<T> comparer)
Parameters
Type |
Name |
Description |
System.Nullable<T> |
from |
|
System.Nullable<T> |
to |
|
System.Collections.Generic.IComparer<T> |
comparer |
|
Properties
From
Declaration
public Nullable<T> From { get; }
Property Value
Type |
Description |
System.Nullable<T> |
|
To
Declaration
public Nullable<T> To { get; }
Property Value
Type |
Description |
System.Nullable<T> |
|
Methods
Contains(T)
Declaration
public bool Contains(T value)
Parameters
Type |
Name |
Description |
T |
value |
|
Returns
Type |
Description |
System.Boolean |
|
Equals(Range<T>)
Declaration
public bool Equals(Range<T> other)
Parameters
Type |
Name |
Description |
Range<T> |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Equals(Range<T>, Range<T>)
Declaration
public static bool Equals(Range<T> x, Range<T> y)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
HasIntersectionWith(Range<T>)
Determines if this interval has intersection with other interval
Declaration
public bool HasIntersectionWith(Range<T> other)
Parameters
Type |
Name |
Description |
Range<T> |
other |
Other interval
|
Returns
Type |
Description |
System.Boolean |
|
IntersectWith(Range<T>)
Gets intersection with other interval
Declaration
public Range<T> IntersectWith(Range<T> other)
Parameters
Type |
Name |
Description |
Range<T> |
other |
Other interval
|
Returns
Type |
Description |
Range<T> |
Intersection of two interval
|
IsBounded()
Specifies whether both interval sides are specified.
Declaration
Returns
Type |
Description |
System.Boolean |
|
IsDegenerate()
Specifies whether both interval sides are specified equal.
Declaration
public bool IsDegenerate()
Returns
Type |
Description |
System.Boolean |
|
IsSpecified()
Specifies whether at least one interval side specified.
Declaration
public bool IsSpecified()
Returns
Type |
Description |
System.Boolean |
|
IsUnbounded()
Specifies whether this range represents infinite interval on both sides.
Declaration
public bool IsUnbounded()
Returns
Type |
Description |
System.Boolean |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Implements
System.IEquatable<>