/// <summary> /// 判断当前object是否为空值(包括0,空字符串等) /// </summary> /// <param name="obj"></param> /// <returns></returns> public static bool isNull(this object obj) { if (obj == null) { return(true); } return(ObjectUtil.isNull(obj.GetType(), obj)); }
/// <summary> /// 判断当前object是否为空值(包括0,空字符串等) /// </summary> /// <param name="obj"></param> /// <param name="type"></param> /// <returns></returns> public static bool isNull(this object obj, Type type) { return(ObjectUtil.isNull(type, obj)); }