IsNull() 공개 정적인 메소드

public static IsNull ( object x ) : bool
x object
리턴 bool
예제 #1
0
 public static int Compare(ClientVersion a, ClientVersion b)
 {
     if (ClientVersion.IsNull(a) && ClientVersion.IsNull(b))
     {
         return(0);
     }
     if (ClientVersion.IsNull(a))
     {
         return(-1);
     }
     if (ClientVersion.IsNull(b))
     {
         return(1);
     }
     return(a.CompareTo(b));
 }
예제 #2
0
        public int Compare(object x, object y)
        {
            if (ClientVersion.IsNull(x) && ClientVersion.IsNull(y))
            {
                return(0);
            }
            if (ClientVersion.IsNull(x))
            {
                return(-1);
            }
            if (ClientVersion.IsNull(y))
            {
                return(1);
            }
            ClientVersion version1 = (x as ClientVersion);
            ClientVersion version2 = (y as ClientVersion);

            if (ClientVersion.IsNull(version1) || ClientVersion.IsNull(version2))
            {
                throw new ArgumentException();
            }
            return(version1.CompareTo(version2));
        }