Struct IntBound
- Namespace
- OptalCP
- Assembly
- OptalCP.dll
Represents an integer bound that can be a fixed value or a range (min, max). Supports implicit conversion from int, (int, int), and (int?, int?) tuples.
public readonly struct IntBound
- Inherited Members
Constructors
IntBound(int)
Creates a new IntBound with a fixed value (min == max).
public IntBound(int value)
Parameters
valueint
IntBound(int?, int?)
Creates a new IntBound with explicit min and max values.
public IntBound(int? min, int? max)
Parameters
Properties
IsFixed
Returns true if this is a fixed value (min == max).
public bool IsFixed { get; }
Property Value
Max
The maximum value of the bound (null if unbounded).
public int? Max { get; }
Property Value
- int?
Min
The minimum value of the bound (null if unbounded).
public int? Min { get; }
Property Value
- int?
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
implicit operator IntBound(int)
Implicit conversion from a single int (creates fixed value bound).
public static implicit operator IntBound(int value)
Parameters
valueint
Returns
implicit operator IntBound((int min, int max))
Implicit conversion from (int, int) tuple (creates range bound).
public static implicit operator IntBound((int min, int max) tuple)
Parameters
Returns
implicit operator IntBound((int min, int? max))
Implicit conversion from (int, int?) tuple.
public static implicit operator IntBound((int min, int? max) tuple)
Parameters
Returns
implicit operator IntBound((int? min, int max))
Implicit conversion from (int?, int) tuple.
public static implicit operator IntBound((int? min, int max) tuple)
Parameters
Returns
implicit operator IntBound((int? min, int? max))
Implicit conversion from (int?, int?) tuple.
public static implicit operator IntBound((int? min, int? max) tuple)