CanBeNull<T>(T, string?)
Checks that a nullable value is non-null and throws an AssertionFailedException if it is not.
Declaration
public static T? CanBeNull<T>(this T obj, string? description = null) where T : class?Parameters
| Type | Name | Description |
|---|---|---|
| T | obj | |
| string | description |
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T |