Ejemplo n.º 1
0
Archivo: 4.cs Proyecto: qifanyyy/CLCDSA
 static int compareBigInt(BigInteger.Sign a)
 {
     if (a == BigInteger.Sign.Negative)
     {
         return(-1);
     }
     else if (a == BigInteger.Sign.Positive)
     {
         return(1);
     }
     else
     {
         return(0);
     }
 }
Ejemplo n.º 2
0
        public int CompareTo(NodeId other)
        {
            if ((object)other == null)
            {
                return(1);
            }

            BigInteger.Sign s = _value.Compare(other._value);
            if (s == BigInteger.Sign.Zero)
            {
                return(0);
            }
            if (s == BigInteger.Sign.Positive)
            {
                return(1);
            }
            return(-1);
        }