Guard.IsNotCloseTo 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
IsNotCloseTo(Single, Single, Single, String) |
Asserts that the input value must not be within a given distance from a specified value. |
IsNotCloseTo(IntPtr, IntPtr, UIntPtr, String) |
Asserts that the input value must not be within a given distance from a specified value. |
IsNotCloseTo(Int32, Int32, UInt32, String) |
Asserts that the input value must not be within a given distance from a specified value. |
IsNotCloseTo(Double, Double, Double, String) |
Asserts that the input value must not be within a given distance from a specified value. |
IsNotCloseTo(Int64, Int64, UInt64, String) |
Asserts that the input value must not be within a given distance from a specified value. |
IsNotCloseTo(Single, Single, Single, String)
Asserts that the input value must not be within a given distance from a specified value.
public static void IsNotCloseTo (float value, float target, float delta, string name);
static member IsNotCloseTo : single * single * single * string -> unit
Public Shared Sub IsNotCloseTo (value As Single, target As Single, delta As Single, name As String)
Parameters
- delta
- Single
The maximum distance to allow between value
and target
.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if (value
- target
) <= delta
.
Applies to
IsNotCloseTo(IntPtr, IntPtr, UIntPtr, String)
Asserts that the input value must not be within a given distance from a specified value.
public static void IsNotCloseTo (nint value, nint target, nuint delta, string name);
static member IsNotCloseTo : nativeint * nativeint * unativeint * string -> unit
Public Shared Sub IsNotCloseTo (value As IntPtr, target As IntPtr, delta As UIntPtr, name As String)
Parameters
- value
-
IntPtr
nint
nativeint
The input nint
value to test.
- target
-
IntPtr
nint
nativeint
The target nint
value to test for.
- delta
-
UIntPtr
nuint
unativeint
The maximum distance to allow between value
and target
.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if (value
- target
) <= delta
.
Applies to
IsNotCloseTo(Int32, Int32, UInt32, String)
Asserts that the input value must not be within a given distance from a specified value.
public static void IsNotCloseTo (int value, int target, uint delta, string name);
static member IsNotCloseTo : int * int * uint32 * string -> unit
Public Shared Sub IsNotCloseTo (value As Integer, target As Integer, delta As UInteger, name As String)
Parameters
- delta
- UInt32
The maximum distance to allow between value
and target
.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if (value
- target
) <= delta
.
Applies to
IsNotCloseTo(Double, Double, Double, String)
Asserts that the input value must not be within a given distance from a specified value.
public static void IsNotCloseTo (double value, double target, double delta, string name);
static member IsNotCloseTo : double * double * double * string -> unit
Public Shared Sub IsNotCloseTo (value As Double, target As Double, delta As Double, name As String)
Parameters
- delta
- Double
The maximum distance to allow between value
and target
.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if (value
- target
) <= delta
.
Applies to
IsNotCloseTo(Int64, Int64, UInt64, String)
Asserts that the input value must not be within a given distance from a specified value.
public static void IsNotCloseTo (long value, long target, ulong delta, string name);
static member IsNotCloseTo : int64 * int64 * uint64 * string -> unit
Public Shared Sub IsNotCloseTo (value As Long, target As Long, delta As ULong, name As String)
Parameters
- delta
- UInt64
The maximum distance to allow between value
and target
.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if (value
- target
) <= delta
.