/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Address != null) { hashCode = hashCode * 59 + Address.GetHashCode(); } if (AdditionalInfo != null) { hashCode = hashCode * 59 + AdditionalInfo.GetHashCode(); } if (DistrictName != null) { hashCode = hashCode * 59 + DistrictName.GetHashCode(); } if (TownName != null) { hashCode = hashCode * 59 + TownName.GetHashCode(); } if (IbgeCode != null) { hashCode = hashCode * 59 + IbgeCode.GetHashCode(); } if (CountrySubDivision != null) { hashCode = hashCode * 59 + CountrySubDivision.GetHashCode(); } if (PostCode != null) { hashCode = hashCode * 59 + PostCode.GetHashCode(); } if (Country != null) { hashCode = hashCode * 59 + Country.GetHashCode(); } if (CountryCode != null) { hashCode = hashCode * 59 + CountryCode.GetHashCode(); } if (GeographicCoordinates != null) { hashCode = hashCode * 59 + GeographicCoordinates.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if SharedAutomatedTellerMachinesPostalAddress instances are equal /// </summary> /// <param name="other">Instance of SharedAutomatedTellerMachinesPostalAddress to be compared</param> /// <returns>Boolean</returns> public bool Equals(SharedAutomatedTellerMachinesPostalAddress other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Address == other.Address || Address != null && Address.Equals(other.Address) ) && ( AdditionalInfo == other.AdditionalInfo || AdditionalInfo != null && AdditionalInfo.Equals(other.AdditionalInfo) ) && ( DistrictName == other.DistrictName || DistrictName != null && DistrictName.Equals(other.DistrictName) ) && ( TownName == other.TownName || TownName != null && TownName.Equals(other.TownName) ) && ( IbgeCode == other.IbgeCode || IbgeCode != null && IbgeCode.Equals(other.IbgeCode) ) && ( CountrySubDivision == other.CountrySubDivision || CountrySubDivision != null && CountrySubDivision.Equals(other.CountrySubDivision) ) && ( PostCode == other.PostCode || PostCode != null && PostCode.Equals(other.PostCode) ) && ( Country == other.Country || Country != null && Country.Equals(other.Country) ) && ( CountryCode == other.CountryCode || CountryCode != null && CountryCode.Equals(other.CountryCode) ) && ( GeographicCoordinates == other.GeographicCoordinates || GeographicCoordinates != null && GeographicCoordinates.Equals(other.GeographicCoordinates) )); }