コード例 #1
0
 /// <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));
 }
コード例 #2
0
 /// <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));
 }