![]() |
VOOZH | about |
NumberRange Struct
Namespace: Json.Schema.DataGeneration
Inheritance: NumberRange 🡒 ValueType 🡒 object
Implemented interfaces:
Defines a number range.
| Name | Type | Summary |
|---|---|---|
| Maximum | Bound | Gets the maximum (upper bound). |
| Minimum | Bound | Gets the minimum (lower bound). |
Creates a new number range.
1
public NumberRange(Bound minimum, Bound maximum)
| Parameter | Type | Description |
|---|---|---|
| minimum | Bound | The minimum |
| maximum | Bound | The maximum |
Calculates whether a single value is contained in the range.
1
public bool Contains(decimal value)
True if the range contains the value; false otherwise.
Calculates the set of one range omitting another. May be multiple ranges.
1
public static IEnumerable<NumberRange> Difference(NumberRange a, NumberRange b)
| Parameter | Type | Description |
|---|---|---|
| a | NumberRange | The source range |
| b | NumberRange | The operating range. |
The resulting set of ranges that exist in the source range but not the operating range.
Indicates whether the current object is equal to another object of the same type.
1
public bool Equals(NumberRange other)
| Parameter | Type | Description |
|---|---|---|
| other | NumberRange | An object to compare with this object. |
true if the current object is equal to the parameter; otherwise, false.
Indicates whether this instance and a specified object are equal.
1
public override bool Equals(object obj)
| Parameter | Type | Description |
|---|---|---|
| obj | object | The object to compare with the current instance. |
true if and this instance are the same type and represent the same value; otherwise, false.
Returns the hash code for this instance.
1
public override int GetHashCode()
A 32-bit signed integer that is the hash code for this instance.
Calculates the intersection of two number ranges. May be multiple ranges.
1
public static IEnumerable<NumberRange> Intersection(NumberRange a, NumberRange b)
The resulting set of ranges that exist in both parameters.
Returns the fully qualified type name of this instance.
1
public override string ToString()
The fully qualified type name.
Calculates the union of two number ranges. May be multiple ranges.
1
public static IEnumerable<NumberRange> Union(NumberRange a, NumberRange b)
The resulting set of ranges that exist in either parameters.
A new version of content is available.