예제 #1
0
 public bool Equals(DomainKey <T> other)
 {
     if (other != null && Value.Equals(other.Value))
     {
         return(true);
     }
     return(false);
 }
예제 #2
0
 public override bool Equals(object obj)
 {
     if (obj != null && obj is DomainKey <T> )
     {
         DomainKey <T> other = (DomainKey <T>)obj;
         return(Equals(other));
     }
     return(false);
 }
예제 #3
0
 public int CompareTo(DomainKey <T> other)
 {
     if (Value is int)
     {
         object obj1     = Value;
         object obj2     = other.Value;
         int    thisInt  = (int)obj1;
         int    otherInt = (int)obj2;
         return(thisInt.CompareTo(otherInt));
     }
     return(Value.ToString().CompareTo(other.Value.ToString()));
 }