Assert.IsNull Assert.IsNull Assert.IsNull Method

Definition

Overloads

IsNull(Object) IsNull(Object) IsNull(Object)

Tests whether the specified object is null and throws an exception if it is not.

IsNull(Object, String) IsNull(Object, String) IsNull(Object, String)

Tests whether the specified object is null and throws an exception if it is not.

IsNull(Object, String, Object[]) IsNull(Object, String, Object[]) IsNull(Object, String, Object[])

Tests whether the specified object is null and throws an exception if it is not.

IsNull(Object) IsNull(Object) IsNull(Object)

Tests whether the specified object is null and throws an exception if it is not.

public static void IsNull (object value);
static member IsNull : obj -> unit
Public Shared Sub IsNull (value As Object)

Parameters

value
Object Object Object

The object the test expects to be null.

Exceptions

IsNull(Object, String) IsNull(Object, String) IsNull(Object, String)

Tests whether the specified object is null and throws an exception if it is not.

public static void IsNull (object value, string message);
static member IsNull : obj * string -> unit
Public Shared Sub IsNull (value As Object, message As String)

Parameters

value
Object Object Object

The object the test expects to be null.

message
String String String

The message to include in the exception when value is not null. The message is shown in test results.

Exceptions

IsNull(Object, String, Object[]) IsNull(Object, String, Object[]) IsNull(Object, String, Object[])

Tests whether the specified object is null and throws an exception if it is not.

public static void IsNull (object value, string message, params object[] parameters);
static member IsNull : obj * string * obj[] -> unit
Public Shared Sub IsNull (value As Object, message As String, ParamArray parameters As Object())

Parameters

value
Object Object Object

The object the test expects to be null.

message
String String String

The message to include in the exception when value is not null. The message is shown in test results.

parameters
Object[]

An array of parameters to use when formatting message.

Exceptions

Applies to