Compartilhar via


PexAssume.IsNull Method

Definition

Overloads

IsNull(Object)

The test case fails if the value is not a null reference.

IsNull(Object, String)

The test case fails if the value is not a null reference, with a specified message in the exception object.

IsNull(Object, String, Object[])

The test case fails if the value is not a null reference, with a specified message in the exception object.

IsNull(Object)

The test case fails if the value is not a null reference.

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

Parameters

value
Object

An object.

Exceptions

If the value is not a null reference.

Applies to

IsNull(Object, String)

The test case fails if the value is not a null reference, with a specified message in the exception object.

public:
 static void IsNull(System::Object ^ value, System::String ^ message);
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

An object.

message
String

A message string.

Exceptions

If the value is not a null reference.

Applies to

IsNull(Object, String, Object[])

The test case fails if the value is not a null reference, with a specified message in the exception object.

public:
 static void IsNull(System::Object ^ value, System::String ^ format, ... cli::array <System::Object ^> ^ args);
public static void IsNull (object value, string format, params object[] args);
static member IsNull : obj * string * obj[] -> unit
Public Shared Sub IsNull (value As Object, format As String, ParamArray args As Object())

Parameters

value
Object

An object.

format
String

A message format string. The syntax for this string is identical to the format string used by Console.Writeline. In particular, insert "{0}", "{1}" and so on at appropriate locations in the string to represent the values of the variables in the args array.

args
Object[]

One or more variables, whose values are to be inserted in the format string.

Exceptions

If the value is not a null reference.

Applies to