public override bool Equals(object obj) { if (obj == null) { return(false); } if (this.GetType() != obj.GetType()) { return(false); } MXRecord mxOther = obj as MXRecord; if (mxOther == null) { return(false); } if (mxOther._preference != _preference) { return(false); } if (mxOther._domainName != _domainName) { return(false); } return(true); }
public int CompareTo(object obj) { MXRecord mxOther = (MXRecord)obj; if (mxOther._preference < _preference) { return(1); } if (mxOther._preference > _preference) { return(-1); } return(-mxOther._domainName.CompareTo(_domainName)); }