/// <summary> /// Returns true if AddressInfo instances are equal /// </summary> /// <param name="other">Instance of AddressInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(AddressInfo other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( AddressId == other.AddressId || AddressId != null && AddressId.Equals(other.AddressId) ) && ( Nickname == other.Nickname || Nickname != null && Nickname.Equals(other.Nickname) ) && ( IsPrimary == other.IsPrimary || IsPrimary != null && IsPrimary.Equals(other.IsPrimary) ) && ( CountryName == other.CountryName || CountryName != null && CountryName.Equals(other.CountryName) ) && ( CountryId == other.CountryId || CountryId != null && CountryId.Equals(other.CountryId) ) && ( Zip == other.Zip || Zip != null && Zip.Equals(other.Zip) ) && ( City == other.City || City != null && City.Equals(other.City) ) && ( AdministrativeArea == other.AdministrativeArea || AdministrativeArea != null && AdministrativeArea.Equals(other.AdministrativeArea) ) && ( DependentLocality == other.DependentLocality || DependentLocality != null && DependentLocality.Equals(other.DependentLocality) ) && ( SortingCode == other.SortingCode || SortingCode != null && SortingCode.Equals(other.SortingCode) ) && ( Organization == other.Organization || Organization != null && Organization.Equals(other.Organization) ) && ( AddressLine1 == other.AddressLine1 || AddressLine1 != null && AddressLine1.Equals(other.AddressLine1) ) && ( AddressLine2 == other.AddressLine2 || AddressLine2 != null && AddressLine2.Equals(other.AddressLine2) )); }