Assert.Null 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
Null(Object) |
Verifies that the object that is passed in is equal to |
Null(Object, String) |
Verifies that the object that is passed in is equal to |
Null(Object, String, Object[]) |
Verifies that the object that is passed in is equal to |
Null(Object)
Verifies that the object that is passed in is equal to null
If the object is not null null
then an AssertionException
is thrown.
public static void Null (object anObject);
static member Null : obj -> unit
Parameters
- anObject
- Object
The object that is to be tested
Applies to
Null(Object, String)
Verifies that the object that is passed in is equal to null
If the object is not null
then an AssertionException
is thrown.
public static void Null (object anObject, string message);
static member Null : obj * string -> unit
Parameters
- anObject
- Object
The object that is to be tested
- message
- String
The message to be displayed when the object is not null
Applies to
Null(Object, String, Object[])
Verifies that the object that is passed in is equal to null
If the object is not null
then an AssertionException
is thrown.
public static void Null (object anObject, string message, params object[] args);
static member Null : obj * string * obj[] -> unit
Parameters
- anObject
- Object
The object that is to be tested
- message
- String
The message to be displayed when the object is not null
- args
- Object[]
Arguments to be used in formatting the message