Guard.IsNotAssignableToType Method

Definition

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

value
Object

The input Object to test.

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

value
Object

The input Object to test.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value can be assigned to type T.

Applies to