Method IsNotNull
IsNotNull<T>(T)
Assert that a value is not a null reference. Throws an exception if the assertion fails.
Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void IsNotNull<T>(T value)
where T : class
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | The value that the caller expects to be a non-null reference to |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the object being tested. |
IsNotNull<T>(T, String)
Assert that a value is not a null reference. Throws an exception if the assertion fails.
Declaration
[Conditional("UNITY_ASSERTIONS")]
public static void IsNotNull<T>(T value, string message)
where T : class
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | The value that the caller expects to be a non-null reference to |
| String | message | If the assertion fails, this message will be logged. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the object being tested. |