Open sandboxFocus

Constructor LessThanAttribute

LessThanAttribute(long, int)

Initializes a new instance of the LessThanAttribute class specifying a maximum value of type long.

Declaration
public LessThanAttribute(long max, int decimalPlaces = 0)
Parameters
Type Name Description
long max

The maximum allowed value.

int decimalPlaces

When non-zero, interprets the max number as decimal instead of long by adding a decimal point at the specified position. For instance, if max is set to 1234 and decimalPlaces is set to 3, the max parameter will be reinterpreted as 1.234m.

LessThanAttribute(int, int)

Initializes a new instance of the LessThanAttribute class specifying a maximum value of type int.

Declaration
public LessThanAttribute(int max, int decimalPlaces = 0)
Parameters
Type Name Description
int max

The maximum allowed value.

int decimalPlaces

When non-zero, interprets the max number as decimal instead of long by adding a decimal point at the specified position. For instance, if max is set to 1234 and decimalPlaces is set to 3, the max parameter will be reinterpreted as 1.234m.

LessThanAttribute(short)

Initializes a new instance of the LessThanAttribute class specifying a maximum value of type short.

Declaration
public LessThanAttribute(short max)
Parameters
Type Name Description
short max

The maximum allowed value.

LessThanAttribute(sbyte)

Initializes a new instance of the LessThanAttribute class specifying a maximum value of type sbyte.

Declaration
public LessThanAttribute(sbyte max)
Parameters
Type Name Description
sbyte max

The maximum allowed value.

LessThanAttribute(ulong)

Initializes a new instance of the LessThanAttribute class specifying a maximum value of type ulong.

Declaration
public LessThanAttribute(ulong max)
Parameters
Type Name Description
ulong max

The maximum allowed value.

LessThanAttribute(uint)

Initializes a new instance of the LessThanAttribute class specifying a maximum value of type uint.

Declaration
public LessThanAttribute(uint max)
Parameters
Type Name Description
uint max

The maximum allowed value.

LessThanAttribute(ushort)

Initializes a new instance of the LessThanAttribute class specifying a maximum value of type ushort.

Declaration
public LessThanAttribute(ushort max)
Parameters
Type Name Description
ushort max

The maximum allowed value.

LessThanAttribute(byte)

Initializes a new instance of the LessThanAttribute class specifying a maximum value of type byte.

Declaration
public LessThanAttribute(byte max)
Parameters
Type Name Description
byte max

The maximum allowed value.

LessThanAttribute(double)

Initializes a new instance of the LessThanAttribute class specifying a maximum value of type double.

Declaration
public LessThanAttribute(double max)
Parameters
Type Name Description
double max

The maximum allowed value.

LessThanAttribute(float)

Initializes a new instance of the LessThanAttribute class specifying a maximum value of type float.

Declaration
public LessThanAttribute(float max)
Parameters
Type Name Description
float max

The maximum allowed value.

LessThanAttribute(decimal)

Initializes a new instance of the LessThanAttribute class specifying a maximum value of type decimal.

Declaration
public LessThanAttribute(decimal max)
Parameters
Type Name Description
decimal max

The maximum allowed value.