/// <summary> /// Calculates hash code based on the contained data. /// </summary> /// <returns>The hash code of the object.</returns> public override int GetHashCode() { return (DisplayName.GetHashCode() + Username.GetHashCode() + RegisterName.GetHashCode() + Password.GetHashCode() + Domain.GetHashCode() + Proxy.GetHashCode() + RegRequired.GetHashCode()); }
/// <summary> /// Equality comparer. /// </summary> /// <param name="obj">Meant to be other PhoneLineInfo object.</param> /// <returns>Returns true if the two objects are equal, otherwise false.</returns> public override bool Equals(object obj) { if (obj == this) { return(true); } PhoneLineInfo other = obj as PhoneLineInfo; if (other == null) { return(false); } return (DisplayName.Equals(other.DisplayName) && Username.Equals(other.Username) && RegisterName.Equals(other.RegisterName) && Password.Equals(other.Password) && Domain.Equals(other.Domain) && Proxy.Equals(other.Proxy) && RegRequired.Equals(other.RegRequired)); }