Guard.IsLessThanOrEqualTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
IsLessThanOrEqualTo(UInt32, UInt32, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo(UInt16, UInt16, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo(Single, Single, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo(SByte, SByte, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo(IntPtr, IntPtr, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo(Int64, Int64, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo(Decimal, Decimal, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo(Int16, Int16, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo(Double, Double, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo(UInt64, UInt64, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo(Char, Char, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo(Byte, Byte, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo(Int32, Int32, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo(UIntPtr, UIntPtr, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo<T>(T, T, String) |
Asserts that the input value must be less than or equal to a specified value. |
IsLessThanOrEqualTo(UInt32, UInt32, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo (uint value, uint maximum, string name);
static member IsLessThanOrEqualTo : uint32 * uint32 * string -> unit
Public Shared Sub IsLessThanOrEqualTo (value As UInteger, maximum As UInteger, name As String)
Parameters
- 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
IsLessThanOrEqualTo(UInt16, UInt16, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo (ushort value, ushort maximum, string name);
static member IsLessThanOrEqualTo : uint16 * uint16 * string -> unit
Public Shared Sub IsLessThanOrEqualTo (value As UShort, maximum As UShort, name As String)
Parameters
- 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
IsLessThanOrEqualTo(Single, Single, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo (float value, float maximum, string name);
static member IsLessThanOrEqualTo : single * single * string -> unit
Public Shared Sub IsLessThanOrEqualTo (value As Single, maximum As Single, name As String)
Parameters
- 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
IsLessThanOrEqualTo(SByte, SByte, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo (sbyte value, sbyte maximum, string name);
static member IsLessThanOrEqualTo : sbyte * sbyte * string -> unit
Public Shared Sub IsLessThanOrEqualTo (value As SByte, maximum As SByte, name As String)
Parameters
- 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
IsLessThanOrEqualTo(IntPtr, IntPtr, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo (nint value, nint maximum, string name);
static member IsLessThanOrEqualTo : nativeint * nativeint * string -> unit
Public Shared Sub IsLessThanOrEqualTo (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 inclusive 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
IsLessThanOrEqualTo(Int64, Int64, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo (long value, long maximum, string name);
static member IsLessThanOrEqualTo : int64 * int64 * string -> unit
Public Shared Sub IsLessThanOrEqualTo (value As Long, maximum As Long, name As String)
Parameters
- 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
IsLessThanOrEqualTo(Decimal, Decimal, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo (decimal value, decimal maximum, string name);
static member IsLessThanOrEqualTo : decimal * decimal * string -> unit
Public Shared Sub IsLessThanOrEqualTo (value As Decimal, maximum As Decimal, name As String)
Parameters
- 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
IsLessThanOrEqualTo(Int16, Int16, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo (short value, short maximum, string name);
static member IsLessThanOrEqualTo : int16 * int16 * string -> unit
Public Shared Sub IsLessThanOrEqualTo (value As Short, maximum As Short, name As String)
Parameters
- 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
IsLessThanOrEqualTo(Double, Double, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo (double value, double maximum, string name);
static member IsLessThanOrEqualTo : double * double * string -> unit
Public Shared Sub IsLessThanOrEqualTo (value As Double, maximum As Double, name As String)
Parameters
- 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
IsLessThanOrEqualTo(UInt64, UInt64, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo (ulong value, ulong maximum, string name);
static member IsLessThanOrEqualTo : uint64 * uint64 * string -> unit
Public Shared Sub IsLessThanOrEqualTo (value As ULong, maximum As ULong, name As String)
Parameters
- 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
IsLessThanOrEqualTo(Char, Char, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo (char value, char maximum, string name);
static member IsLessThanOrEqualTo : char * char * string -> unit
Public Shared Sub IsLessThanOrEqualTo (value As Char, maximum As Char, name As String)
Parameters
- 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
IsLessThanOrEqualTo(Byte, Byte, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo (byte value, byte maximum, string name);
static member IsLessThanOrEqualTo : byte * byte * string -> unit
Public Shared Sub IsLessThanOrEqualTo (value As Byte, maximum As Byte, name As String)
Parameters
- 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
IsLessThanOrEqualTo(Int32, Int32, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo (int value, int maximum, string name);
static member IsLessThanOrEqualTo : int * int * string -> unit
Public Shared Sub IsLessThanOrEqualTo (value As Integer, maximum As Integer, name As String)
Parameters
- 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
IsLessThanOrEqualTo(UIntPtr, UIntPtr, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo (nuint value, nuint maximum, string name);
static member IsLessThanOrEqualTo : unativeint * unativeint * string -> unit
Public Shared Sub IsLessThanOrEqualTo (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 inclusive 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
IsLessThanOrEqualTo<T>(T, T, String)
Asserts that the input value must be less than or equal to a specified value.
public static void IsLessThanOrEqualTo<T> (T value, T maximum, string name) where T : IComparable<T>;
static member IsLessThanOrEqualTo : 'T * 'T * string -> unit (requires 'T :> IComparable<'T>)
Public Shared Sub IsLessThanOrEqualTo(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 inclusive 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.