System.Convert.IsDBNull C# (CSharp) Method

IsDBNull() public static method

public static IsDBNull ( object value ) : bool
value object
return bool
        public static bool IsDBNull(object value) {
            if (value == System.DBNull.Value) return true;
            IConvertible convertible = value as IConvertible;
            return convertible != null? convertible.GetTypeCode() == TypeCode.DBNull: false;
        }

Usage Example

Beispiel #1
0
 public static Boolean IsDBNull <T>(this T @this) where T : class
 {
     return(Convert.IsDBNull(@this));
 }
All Usage Examples Of System.Convert::IsDBNull