IsNull

public static bool IsNull(this object obj)
{
return obj == null || obj == DBNull.Value || Convert.IsDBNull(obj) == true;
}
Example:
string foo = null;
if(foo.IsNull())
{
  //...
}

Description

A better IsNull() implementation. Returns true if object value is null or DBNull

Details

Double click on the code to select all.

 

;