Open sandboxFocus

Constructor LessThanOrEqualAttribute

LessThanOrEqualAttribute(long, int)

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

Declaration
public LessThanOrEqualAttribute(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.

LessThanOrEqualAttribute(int, int)

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

Declaration
public LessThanOrEqualAttribute(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.

LessThanOrEqualAttribute(short)

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

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

The maximum allowed value.

LessThanOrEqualAttribute(sbyte)

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

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

The maximum allowed value.

LessThanOrEqualAttribute(ulong)

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

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

The maximum allowed value.

LessThanOrEqualAttribute(uint)

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

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

The maximum allowed value.

LessThanOrEqualAttribute(ushort)

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

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

The maximum allowed value.

LessThanOrEqualAttribute(byte)

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

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

The maximum allowed value.

LessThanOrEqualAttribute(double)

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

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

The maximum allowed value.

LessThanOrEqualAttribute(float)

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

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

The maximum allowed value.

LessThanOrEqualAttribute(decimal)

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

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

The maximum allowed value.