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