public override bool Equals(object obj) { MxRecord other = obj as MxRecord; if (obj == null) { return(false); } if (other.Preference != Preference) { return(false); } if (other.DomainName != DomainName) { return(false); } return(true); }
public int CompareTo(object obj) { MxRecord other = obj as MxRecord; if (other != null) { if (other.Preference < Preference) { return(1); } if (other.Preference > Preference) { return(-1); } return(-other.DomainName.CompareTo(_domainName)); } else { return(0); } }