RangeAttribute Constructor
RangeAttribute(Int64, Int64, Boolean, Boolean, Int32)
Initializes a new instance of the RangeAttribute class specifying bounds of type Int64.
Declaration
public RangeAttribute(long min, long max, bool minAllowed = true, bool maxAllowed = true, int decimalPlaces = 0)
Parameters
Type | Name | Description |
---|---|---|
Int64 | min | The minimum value. |
Int64 | max | The maximum value. |
Boolean | minAllowed | Determines if the |
Boolean | maxAllowed | Determines if the |
Int32 | decimalPlaces | When non-zero, interprets the |
RangeAttribute(UInt64, UInt64, Boolean, Boolean)
Initializes a new instance of the RangeAttribute class specifying bounds of type UInt64.
Declaration
public RangeAttribute(ulong min, ulong max, bool minAllowed = true, bool maxAllowed = true)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | min | The minimum value. |
UInt64 | max | The maximum value. |
Boolean | minAllowed | Determines if the |
Boolean | maxAllowed | Determines if the |
RangeAttribute(Double, Double, Boolean, Boolean)
Initializes a new instance of the RangeAttribute class specifying bounds of type Double.
Declaration
public RangeAttribute(double min, double max, bool minAllowed = true, bool maxAllowed = true)
Parameters
Type | Name | Description |
---|---|---|
Double | min | The minimum value. |
Double | max | The maximum value. |
Boolean | minAllowed | Determines if the |
Boolean | maxAllowed | Determines if the |
RangeAttribute(Single, Single, Boolean, Boolean)
Initializes a new instance of the RangeAttribute class specifying bounds of type Single.
Declaration
public RangeAttribute(float min, float max, bool minAllowed = true, bool maxAllowed = true)
Parameters
Type | Name | Description |
---|---|---|
Single | min | The minimum value. |
Single | max | The maximum value. |
Boolean | minAllowed | Determines if the |
Boolean | maxAllowed | Determines if the |
RangeAttribute(Int32, Int32, Boolean, Boolean, Int32)
Initializes a new instance of the RangeAttribute class specifying bounds of type Int32.
Declaration
public RangeAttribute(int min, int max, bool minAllowed = true, bool maxAllowed = true, int decimalPlaces = 0)
Parameters
Type | Name | Description |
---|---|---|
Int32 | min | The minimum value. |
Int32 | max | The maximum value. |
Boolean | minAllowed | Determines if the |
Boolean | maxAllowed | Determines if the |
Int32 | decimalPlaces | When non-zero, interprets the |
RangeAttribute(UInt32, UInt32, Boolean, Boolean)
Initializes a new instance of the RangeAttribute class specifying bounds of type UInt32.
Declaration
public RangeAttribute(uint min, uint max, bool minAllowed = true, bool maxAllowed = true)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | min | The minimum value. |
UInt32 | max | The maximum value. |
Boolean | minAllowed | Determines if the |
Boolean | maxAllowed | Determines if the |
RangeAttribute(Byte, SByte, Boolean, Boolean)
Initializes a new instance of the RangeAttribute class specifying bounds of type Byte.
Declaration
public RangeAttribute(byte min, sbyte max, bool minAllowed = true, bool maxAllowed = true)
Parameters
Type | Name | Description |
---|---|---|
Byte | min | The minimum value. |
SByte | max | The maximum value. |
Boolean | minAllowed | Determines if the |
Boolean | maxAllowed | Determines if the |
RangeAttribute(Int16, Int16, Boolean, Boolean)
Initializes a new instance of the RangeAttribute class specifying bounds of type Int16.
Declaration
public RangeAttribute(short min, short max, bool minAllowed = true, bool maxAllowed = true)
Parameters
Type | Name | Description |
---|---|---|
Int16 | min | The minimum value. |
Int16 | max | The maximum value. |
Boolean | minAllowed | Determines if the |
Boolean | maxAllowed | Determines if the |
RangeAttribute(UInt16, UInt16, Boolean, Boolean)
Initializes a new instance of the RangeAttribute class specifying bounds of type UInt16.
Declaration
public RangeAttribute(ushort min, ushort max, bool minAllowed = true, bool maxAllowed = true)
Parameters
Type | Name | Description |
---|---|---|
UInt16 | min | The minimum value. |
UInt16 | max | The maximum value. |
Boolean | minAllowed | Determines if the |
Boolean | maxAllowed | Determines if the |