Struct
ValueRange<T>

Represents a structure that defines a range of two IComparable structures - like Single or Double.

Definition

Namespace:Telerik.Charting

Assembly:Telerik.Windows.Controls.Chart.dll

Type Parameters:

T

Must implement the IComparable interface.

Syntax:

cs-api-definition
public struct ValueRange<T> where T : struct, IComparable<T>

Inherited Members ValueType.ToString()

Constructors

ValueRange(T, T)

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

Declaration

cs-api-definition
public ValueRange(T min, T max)

Parameters

min

T

The minimum value.

max

T

The maximum value.

Fields

Empty

Empty value range where minimum and maximum are set to their default(T) value.

Declaration

cs-api-definition
public static readonly ValueRange<T> Empty

Field Value

ValueRange<T>

Properties

Maximum

Gets or sets the maximum value of the range.

Declaration

cs-api-definition
public T Maximum { get; set; }

Property Value

T

Minimum

Gets or sets the minimum value of the range.

Declaration

cs-api-definition
public T Minimum { get; set; }

Property Value

T

Methods

Equals(object)

Determines whether the specified object is equal to this instance.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare with this instance.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

Overrides ValueType.Equals(object)

GetHashCode()

Returns a hash code for this instance.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides ValueType.GetHashCode()

IsInRangeExclusive(T)

Determines whether the specified value is within the range, excluding its minimum and maximum values.

Declaration

cs-api-definition
public bool IsInRangeExclusive(T value)

Parameters

value

T

The tested value.

Returns

bool

true if the value is within the range, excluding its minimum and maximum; otherwise, false.

IsInRangeInclusive(T)

Determines whether the specified value is within the range, including its minimum and maximum values.

Declaration

cs-api-definition
public bool IsInRangeInclusive(T value)

Parameters

value

T

The tested value.

Returns

bool

true if the value is within the range, including its minimum and maximum; otherwise, false.

Operators

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

Determines whether two ranges are not equal.

Declaration

cs-api-definition
public static bool operator !=(ValueRange<T> range1, ValueRange<T> range2)

Parameters

range1

ValueRange<T>

The first range.

range2

ValueRange<T>

The second range.

Returns

bool

true if the operands are not equal; otherwise, false.

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

Determines whether two ranges are not equal.

Declaration

cs-api-definition
public static bool operator ==(ValueRange<T> range1, ValueRange<T> range2)

Parameters

range1

ValueRange<T>

The first range.

range2

ValueRange<T>

The second range.

Returns

bool

true if the operands are equal; otherwise, false.