Пример #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (obj is IpAddresses == false)
            {
                return(false);
            }

            IpAddresses two = obj as IpAddresses;

            // Note: return false if contains the same IPs but in different order // 2.19.5
            return(ToString() == two.ToString());
        }
Пример #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (obj is IpAddresses == false)
            {
                return(false);
            }

            IpAddresses two = obj as IpAddresses;

            // Works because ToString sort items.
            return(ToString() == two.ToString());
        }