Guard.IsNotAssignableToType 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
IsNotAssignableToType(Object, Type, String) |
Asserts that the input value can't be assigned to a specified type. |
IsNotAssignableToType<T>(Object, String) |
Asserts that the input value can't be assigned to a specified type. |
IsNotAssignableToType(Object, Type, String)
Asserts that the input value can't be assigned to a specified type.
public static void IsNotAssignableToType (object value, Type type, string name);
static member IsNotAssignableToType : obj * Type * string -> unit
Public Shared Sub IsNotAssignableToType (value As Object, type As Type, name As String)
Parameters
- type
- Type
The type to look for.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if value
can be assigned to type
.
Applies to
IsNotAssignableToType<T>(Object, String)
Asserts that the input value can't be assigned to a specified type.
public static void IsNotAssignableToType<T> (object value, string name);
static member IsNotAssignableToType : obj * string -> unit
Public Shared Sub IsNotAssignableToType(Of T) (value As Object, name As String)
Type Parameters
- T
The type to check the input value against.
Parameters
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if value
can be assigned to type T
.