Table of Contents

Struct Range<T>

Namespace
LinqStatistics
Assembly
LinqStatistics.dll

An ordered pair of values, representing a segment.

public struct Range<T> : IFormattable, IEquatable<Range<T>>, IComparable, IComparable<Range<T>> where T : struct, IComparable<T>, IFormattable, IEquatable<T>

Type Parameters

T
An ordered pair of values, representing a segment.
Implements
Inherited Members

Constructors

Range(T, T)

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

public Range(T min, T max)

Parameters

min T

The minimal value of segment.

max T

The maximal value of segment.

Properties

Max

Gets the maximal value of segment.

public readonly T Max { get; }

Property Value

T

The Max.

Min

Gets the minimal value of segment.

public readonly T Min { get; }

Property Value

T

The Min.

Methods

CompareTo(Range<T>)

public readonly int CompareTo(Range<T> other)

Parameters

other Range<T>

Returns

int

CompareTo(object)

public int CompareTo(object obj)

Parameters

obj object

Returns

int

Equals(Range<T>)

Indicates whether the current object is equal to another object of the same type.

public readonly bool Equals(Range<T> other)

Parameters

other Range<T>

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object obj)

Parameters

obj object

Another object to compare to.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override readonly int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns a string representation of the range

public override readonly string ToString()

Returns

string

A string representation of the range

ToString(IFormatProvider)

public readonly string ToString(IFormatProvider provider)

Parameters

provider IFormatProvider

Returns

string

ToString(string)

public readonly string ToString(string format)

Parameters

format string

Returns

string

ToString(string, IFormatProvider)

public readonly string ToString(string format, IFormatProvider formatProvider)

Parameters

format string
formatProvider IFormatProvider

Returns

string

Operators

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

public static bool operator ==(Range<T> first, Range<T> second)

Parameters

first Range<T>
second Range<T>

Returns

bool

operator >(Range<T>, Range<T>)

public static bool operator >(Range<T> first, Range<T> second)

Parameters

first Range<T>
second Range<T>

Returns

bool

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

public static bool operator >=(Range<T> first, Range<T> second)

Parameters

first Range<T>
second Range<T>

Returns

bool

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

public static bool operator !=(Range<T> first, Range<T> second)

Parameters

first Range<T>
second Range<T>

Returns

bool

operator <(Range<T>, Range<T>)

public static bool operator <(Range<T> first, Range<T> second)

Parameters

first Range<T>
second Range<T>

Returns

bool

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

public static bool operator <=(Range<T> first, Range<T> second)

Parameters

first Range<T>
second Range<T>

Returns

bool