Example #1
0
        public int CompareTo(object obj)
        {
            var other = obj as IPAddress;

            if (other != null)
            {
                return(AddressAsDecimal.CompareTo(other.AddressAsDecimal));
            }
            else
            {
                return(1);
            }
        }
Example #2
0
        public override bool Equals(object obj)
        {
            var other = obj as IPAddress;

            return(other != null && AddressAsDecimal.Equals(other.AddressAsDecimal));
        }
Example #3
0
 public override int GetHashCode()
 {
     return(AddressAsDecimal.GetHashCode());
 }