Guard.IsNotOfType 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
IsNotOfType(Object, Type, String) |
Asserts that the input value is not of a specific type. |
IsNotOfType<T>(Object, String) |
Asserts that the input value is not of a specific type. |
IsNotOfType(Object, Type, String)
Asserts that the input value is not of a specific type.
public static void IsNotOfType (object value, Type type, string name);
static member IsNotOfType : obj * Type * string -> unit
Public Shared Sub IsNotOfType (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 the type of value
is the same as type
.
Applies to
IsNotOfType<T>(Object, String)
Asserts that the input value is not of a specific type.
public static void IsNotOfType<T> (object value, string name);
static member IsNotOfType : obj * string -> unit
Public Shared Sub IsNotOfType(Of T) (value As Object, name As String)
Type Parameters
- T
The type of the input value.
Parameters
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if value
is of type T
.