예제 #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));
            }
예제 #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));
 }