MetalamaAPI documentationPatterns APIMetalama.​Patterns.​ContractsStrictly­Less­Than­AttributeStrictly­Less­Than­Attribute
Open sandboxFocus

StrictlyLessThanAttribute Constructor

StrictlyLessThanAttribute(Int64, Int32)

Initializes a new instance of the StrictlyLessThanAttribute class specifying a maximum value of type System.Int64.

Declaration
public StrictlyLessThanAttribute(long max, int decimalPlaces = 0)
Parameters
Type Name Description
System.Int64 max

The maximum allowed value.

System.Int32 decimalPlaces

When non-zero, interprets the max number as System.Decimal instead of System.Int64 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.

StrictlyLessThanAttribute(Int32, Int32)

Initializes a new instance of the StrictlyLessThanAttribute class specifying a maximum value of type System.Int32.

Declaration
public StrictlyLessThanAttribute(int max, int decimalPlaces = 0)
Parameters
Type Name Description
System.Int32 max

The maximum allowed value.

System.Int32 decimalPlaces

When non-zero, interprets the max number as System.Decimal instead of System.Int64 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.

StrictlyLessThanAttribute(Int16)

Initializes a new instance of the StrictlyLessThanAttribute class specifying a maximum value of type System.Int16.

Declaration
public StrictlyLessThanAttribute(short max)
Parameters
Type Name Description
System.Int16 max

The maximum allowed value.

StrictlyLessThanAttribute(SByte)

Initializes a new instance of the StrictlyLessThanAttribute class specifying a maximum value of type System.SByte.

Declaration
public StrictlyLessThanAttribute(sbyte max)
Parameters
Type Name Description
System.SByte max

The maximum allowed value.

StrictlyLessThanAttribute(UInt64)

Initializes a new instance of the StrictlyLessThanAttribute class specifying a maximum value of type System.UInt64.

Declaration
public StrictlyLessThanAttribute(ulong max)
Parameters
Type Name Description
System.UInt64 max

The maximum allowed value.

StrictlyLessThanAttribute(UInt32)

Initializes a new instance of the StrictlyLessThanAttribute class specifying a maximum value of type System.UInt32.

Declaration
public StrictlyLessThanAttribute(uint max)
Parameters
Type Name Description
System.UInt32 max

The maximum allowed value.

StrictlyLessThanAttribute(UInt16)

Initializes a new instance of the StrictlyLessThanAttribute class specifying a maximum value of type System.UInt16.

Declaration
public StrictlyLessThanAttribute(ushort max)
Parameters
Type Name Description
System.UInt16 max

The maximum allowed value.

StrictlyLessThanAttribute(Byte)

Initializes a new instance of the StrictlyLessThanAttribute class specifying a maximum value of type System.Byte.

Declaration
public StrictlyLessThanAttribute(byte max)
Parameters
Type Name Description
System.Byte max

The maximum allowed value.

StrictlyLessThanAttribute(Double)

Initializes a new instance of the StrictlyLessThanAttribute class specifying a maximum value of type System.Double.

Declaration
public StrictlyLessThanAttribute(double max)
Parameters
Type Name Description
System.Double max

The maximum allowed value.

StrictlyLessThanAttribute(Single)

Initializes a new instance of the StrictlyLessThanAttribute class specifying a maximum value of type System.Single.

Declaration
public StrictlyLessThanAttribute(float max)
Parameters
Type Name Description
System.Single max

The maximum allowed value.

StrictlyLessThanAttribute(Decimal)

Initializes a new instance of the StrictlyLessThanAttribute class specifying a maximum value of type System.Decimal.

Declaration
public StrictlyLessThanAttribute(Decimal max)
Parameters
Type Name Description
System.Decimal max

The maximum allowed value.