Guard.IsLessThan Method

Definition

Overloads

IsLessThan(UInt32, UInt32, String)

Asserts that the input value must be less than a specified value.

IsLessThan(Single, Single, String)

Asserts that the input value must be less than a specified value.

IsLessThan(UInt64, UInt64, String)

Asserts that the input value must be less than a specified value.

IsLessThan(SByte, SByte, String)

Asserts that the input value must be less than a specified value.

IsLessThan(UIntPtr, UIntPtr, String)

Asserts that the input value must be less than a specified value.

IsLessThan(IntPtr, IntPtr, String)

Asserts that the input value must be less than a specified value.

IsLessThan(UInt16, UInt16, String)

Asserts that the input value must be less than a specified value.

IsLessThan(Int32, Int32, String)

Asserts that the input value must be less than a specified value.

IsLessThan(Int16, Int16, String)

Asserts that the input value must be less than a specified value.

IsLessThan(Double, Double, String)

Asserts that the input value must be less than a specified value.

IsLessThan(Int64, Int64, String)

Asserts that the input value must be less than a specified value.

IsLessThan(Decimal, Decimal, String)

Asserts that the input value must be less than a specified value.

IsLessThan(Char, Char, String)

Asserts that the input value must be less than a specified value.

IsLessThan(Byte, Byte, String)

Asserts that the input value must be less than a specified value.

IsLessThan<T>(T, T, String)

Asserts that the input value must be less than a specified value.

IsLessThan(UInt32, UInt32, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan (uint value, uint maximum, string name);
static member IsLessThan : uint32 * uint32 * string -> unit
Public Shared Sub IsLessThan (value As UInteger, maximum As UInteger, name As String)

Parameters

value
UInt32

The input UInt32 value to test.

maximum
UInt32

The exclusive maximum UInt32 value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to

IsLessThan(Single, Single, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan (float value, float maximum, string name);
static member IsLessThan : single * single * string -> unit
Public Shared Sub IsLessThan (value As Single, maximum As Single, name As String)

Parameters

value
Single

The input Single value to test.

maximum
Single

The exclusive maximum Single value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to

IsLessThan(UInt64, UInt64, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan (ulong value, ulong maximum, string name);
static member IsLessThan : uint64 * uint64 * string -> unit
Public Shared Sub IsLessThan (value As ULong, maximum As ULong, name As String)

Parameters

value
UInt64

The input UInt64 value to test.

maximum
UInt64

The exclusive maximum UInt64 value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to

IsLessThan(SByte, SByte, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan (sbyte value, sbyte maximum, string name);
static member IsLessThan : sbyte * sbyte * string -> unit
Public Shared Sub IsLessThan (value As SByte, maximum As SByte, name As String)

Parameters

value
SByte

The input SByte value to test.

maximum
SByte

The exclusive maximum SByte value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to

IsLessThan(UIntPtr, UIntPtr, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan (nuint value, nuint maximum, string name);
static member IsLessThan : unativeint * unativeint * string -> unit
Public Shared Sub IsLessThan (value As UIntPtr, maximum As UIntPtr, name As String)

Parameters

value
UIntPtr

nuint

unativeint

The input nuint value to test.

maximum
UIntPtr

nuint

unativeint

The exclusive maximum nuint value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to

IsLessThan(IntPtr, IntPtr, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan (nint value, nint maximum, string name);
static member IsLessThan : nativeint * nativeint * string -> unit
Public Shared Sub IsLessThan (value As IntPtr, maximum As IntPtr, name As String)

Parameters

value
IntPtr

nint

nativeint

The input nint value to test.

maximum
IntPtr

nint

nativeint

The exclusive maximum nint value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to

IsLessThan(UInt16, UInt16, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan (ushort value, ushort maximum, string name);
static member IsLessThan : uint16 * uint16 * string -> unit
Public Shared Sub IsLessThan (value As UShort, maximum As UShort, name As String)

Parameters

value
UInt16

The input UInt16 value to test.

maximum
UInt16

The exclusive maximum UInt16 value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to

IsLessThan(Int32, Int32, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan (int value, int maximum, string name);
static member IsLessThan : int * int * string -> unit
Public Shared Sub IsLessThan (value As Integer, maximum As Integer, name As String)

Parameters

value
Int32

The input Int32 value to test.

maximum
Int32

The exclusive maximum Int32 value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to

IsLessThan(Int16, Int16, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan (short value, short maximum, string name);
static member IsLessThan : int16 * int16 * string -> unit
Public Shared Sub IsLessThan (value As Short, maximum As Short, name As String)

Parameters

value
Int16

The input Int16 value to test.

maximum
Int16

The exclusive maximum Int16 value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to

IsLessThan(Double, Double, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan (double value, double maximum, string name);
static member IsLessThan : double * double * string -> unit
Public Shared Sub IsLessThan (value As Double, maximum As Double, name As String)

Parameters

value
Double

The input Double value to test.

maximum
Double

The exclusive maximum Double value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to

IsLessThan(Int64, Int64, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan (long value, long maximum, string name);
static member IsLessThan : int64 * int64 * string -> unit
Public Shared Sub IsLessThan (value As Long, maximum As Long, name As String)

Parameters

value
Int64

The input Int64 value to test.

maximum
Int64

The exclusive maximum Int64 value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to

IsLessThan(Decimal, Decimal, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan (decimal value, decimal maximum, string name);
static member IsLessThan : decimal * decimal * string -> unit
Public Shared Sub IsLessThan (value As Decimal, maximum As Decimal, name As String)

Parameters

value
Decimal

The input Decimal value to test.

maximum
Decimal

The exclusive maximum Decimal value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to

IsLessThan(Char, Char, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan (char value, char maximum, string name);
static member IsLessThan : char * char * string -> unit
Public Shared Sub IsLessThan (value As Char, maximum As Char, name As String)

Parameters

value
Char

The input Char value to test.

maximum
Char

The exclusive maximum Char value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to

IsLessThan(Byte, Byte, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan (byte value, byte maximum, string name);
static member IsLessThan : byte * byte * string -> unit
Public Shared Sub IsLessThan (value As Byte, maximum As Byte, name As String)

Parameters

value
Byte

The input Byte value to test.

maximum
Byte

The exclusive maximum Byte value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to

IsLessThan<T>(T, T, String)

Asserts that the input value must be less than a specified value.

public static void IsLessThan<T> (T value, T maximum, string name) where T : IComparable<T>;
static member IsLessThan : 'T * 'T * string -> unit (requires 'T :> IComparable<'T>)
Public Shared Sub IsLessThan(Of T As IComparable(Of T)) (value As T, maximum As T, name As String)

Type Parameters

T

The type of input values to compare.

Parameters

value
T

The input T value to test.

maximum
T

The exclusive maximum T value that is accepted.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is >= maximum.

Remarks

The method is generic to avoid boxing the parameters, if they are value types.

Applies to