Struct Interval<T>
Interval.
public readonly record struct Interval<T> : IInterval, IEquatable<Interval<T>> where T : IComparable<T>
Type Parameters
T- The value type of the interval.
- Implements
-
IEquatable<Interval<T>>
- Inherited Members
Constructors
Interval(T, T, IntervalEndpointTypes)
Interval.
public Interval(T MinValue, T MaxValue, IntervalEndpointTypes EndpointTypes = IntervalEndpointTypes.None)
Parameters
MinValueT- The minimum value.
MaxValueT- The maximum value.
EndpointTypesIntervalEndpointTypes- The type of the endpoints of the interval.
Properties
EndpointTypes
The type of the endpoints of the interval.
public IntervalEndpointTypes EndpointTypes { get; init; }
Property Value
MaxValue
The maximum value.
public T MaxValue { get; init; }
Property Value
- T
MinValue
The minimum value.
public T MinValue { get; init; }
Property Value
- T
Methods
Includes(T)
Determines whether a quantity is included in the quantity interval.
public bool Includes(T value)
Parameters
valueT- The quantity.
Returns
- bool
- Whether the specified quantity is included in the quantity interval.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
- The fully qualified type name.