Container for range definitions. More...
Public Member Functions | |
| ValueRange (TValue min, TValue max) | |
| Initialize a ValueRange object. | |
| bool | Contains (TValue val) |
| Check if a value is within the range. | |
| bool | IntersectsWith (ValueRange< TValue > other) |
| Check if this value range intersects with another value range. | |
| override int | GetHashCode () |
| Standard hashing function. | |
| override bool | Equals (object obj) |
| Equality check for ValueRange structures. | |
Static Public Member Functions | |
| static bool | operator== (ValueRange< TValue > lhs, ValueRange< TValue > rhs) |
| Equality check for two ValueRange structures. | |
| static bool | operator!= (ValueRange< TValue > lhs, ValueRange< TValue > rhs) |
| Inequality check for two ValueRange structures. | |
Properties | |
| TValue | Min [get, set] |
| Minimum value. | |
| TValue | Max [get, set] |
| Maximum value. | |
Container for range definitions.
| TValue | type of value |
| TValue | : | IComparable<TValue> |
| bool Contains | ( | TValue | val | ) |
Check if a value is within the range.
| val | Value to be checked |
| override bool Equals | ( | object | obj | ) |
Equality check for ValueRange structures.
| obj | object to compare to |
true if this object and the object referred to by obj are identical, false otherwise.| override int GetHashCode | ( | ) |
Standard hashing function.
| bool IntersectsWith | ( | ValueRange< TValue > | other | ) |
Check if this value range intersects with another value range.
| other | Object for intersection test. |
|
static |
Inequality check for two ValueRange structures.
| lhs | left hand side |
| rhs | right hand side |
true if lhs and rhs are different, false otherwise.
|
static |
Equality check for two ValueRange structures.
| lhs | left hand side |
| rhs | right hand side |
true if lhs and rhs are identical, false otherwise. | ValueRange | ( | TValue | min, |
| TValue | max ) |
Initialize a ValueRange object.
| min | minimum value |
| max | maximum value |
|
getset |
Maximum value.
| ArgumentException | when trying to set a value that is lower than the currently set Min value |
|
getset |
Minimum value.
| ArgumentException | when trying to set a value that exceeds the currently set Max value |