public int CompareTo(object obj) { var other = obj as IPAddress; if (other != null) { return(AddressAsDecimal.CompareTo(other.AddressAsDecimal)); } else { return(1); } }
public override bool Equals(object obj) { var other = obj as IPAddress; return(other != null && AddressAsDecimal.Equals(other.AddressAsDecimal)); }
public override int GetHashCode() { return(AddressAsDecimal.GetHashCode()); }