Exemple #1
0
        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);
        }
Exemple #2
0
        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);
            }
        }