IsNull()

Determines if the underlying object is null.

Declaration
public static bool IsNull(this object obj)
Example
private enum Level
{
    Low = 0,
    Medium = 15,
    High = 30,
}

DBNull.Value.IsNull();

((object)null).IsNull();

((string)null).IsNull();

Level.Medium.IsNull();
Result
true

true

true

false

Last updated