Exemplo n.º 1
0
            public int CompareTo(BitFieldPosAndAddrKey?other)
            {
                if (other is null)
                {
                    return(1);
                }
                if (ReferenceEquals(this, other))
                {
                    return(0);
                }
                int res;

                res = RegAddr.CompareTo(other.RegAddr);
                if ((res = RegAddr.CompareTo(other.RegAddr)) != 0)
                {
                    return(res);
                }
                return(BitPos.CompareTo(other.BitPos));
            }
Exemplo n.º 2
0
 public int CompareTo(PICRegisterUniqueAddress other)
 {
     if (other == null)
     {
         return(1);
     }
     if (ReferenceEquals(this, other))
     {
         return(0);
     }
     if (Addr is null)
     {
         if (other.Addr is null)
         {
             return(NMMRID.CompareTo(other.NMMRID));
         }
         return(-1);
     }
     if (other.Addr is null)
     {
         return(1);
     }
     return(Addr.CompareTo(other.Addr));
 }