public bool Equals(DomainKey <T> other) { if (other != null && Value.Equals(other.Value)) { return(true); } return(false); }
public override bool Equals(object obj) { if (obj != null && obj is DomainKey <T> ) { DomainKey <T> other = (DomainKey <T>)obj; return(Equals(other)); } return(false); }
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())); }