/// <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 (AddressLine1 != null) { hashCode = hashCode * 59 + AddressLine1.GetHashCode(); } if (AddressLine2 != null) { hashCode = hashCode * 59 + AddressLine2.GetHashCode(); } if (City != null) { hashCode = hashCode * 59 + City.GetHashCode(); } if (State != null) { hashCode = hashCode * 59 + State.GetHashCode(); } if (Zip != null) { hashCode = hashCode * 59 + Zip.GetHashCode(); } if (Country != null) { hashCode = hashCode * 59 + Country.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { int h0 = AddressLine1?.GetHashCode() ?? 0; int h1 = AddressLine2?.GetHashCode() ?? 0; int h2 = City?.GetHashCode() ?? 0; int h3 = State?.GetHashCode() ?? 0; return(h0 ^ h1 ^ h2 ^ h3 ^ Zipcode); }
/// <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 (Nickname != null) { hashCode = hashCode * 59 + Nickname.GetHashCode(); } if (CountryId != null) { hashCode = hashCode * 59 + CountryId.GetHashCode(); } if (Zip != null) { hashCode = hashCode * 59 + Zip.GetHashCode(); } if (City != null) { hashCode = hashCode * 59 + City.GetHashCode(); } if (AdministrativeArea != null) { hashCode = hashCode * 59 + AdministrativeArea.GetHashCode(); } if (DependentLocality != null) { hashCode = hashCode * 59 + DependentLocality.GetHashCode(); } if (SortingCode != null) { hashCode = hashCode * 59 + SortingCode.GetHashCode(); } if (Organization != null) { hashCode = hashCode * 59 + Organization.GetHashCode(); } if (AddressLine1 != null) { hashCode = hashCode * 59 + AddressLine1.GetHashCode(); } if (AddressLine2 != null) { hashCode = hashCode * 59 + AddressLine2.GetHashCode(); } if (IsPrimary != null) { hashCode = hashCode * 59 + IsPrimary.GetHashCode(); } if (SessionToken != null) { hashCode = hashCode * 59 + SessionToken.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Id; hashCode = (hashCode * 397) ^ CustomerId; hashCode = (hashCode * 397) ^ (AddressLine1 != null ? AddressLine1.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (AddressLine2 != null ? AddressLine2.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (City != null ? City.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (State != null ? State.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Country != null ? Country.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = (_postcode != null ? _postcode.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (AddressLine1 != null ? AddressLine1.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (AddressLine2 != null ? AddressLine2.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (AddressLine3 != null ? AddressLine3.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (AddressLine4 != null ? AddressLine4.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Uprn != null ? Uprn.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (GeoPoint != null ? GeoPoint.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + (AddressLine1 == null ? 0 : AddressLine1.GetHashCode()); hash = hash * 23 + (AddressLine2 == null ? 0 : AddressLine2.GetHashCode()); hash = hash * 23 + (City == null ? 0 : City.GetHashCode()); hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode()); hash = hash * 23 + (PostalCode == null ? 0 : PostalCode.GetHashCode()); hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode()); hash = hash * 23 + (StateProvinceId == default(int) ? 0 : StateProvinceId.GetHashCode()); return(hash); } }
public override int GetHashCode() { unchecked { const int hashBase = (int)2166136261; const int multiplier = 16777619; int hash = hashBase; hash = (hash * multiplier) ^ (ContactName is null ? 0 : ContactName.GetHashCode()); hash = (hash * multiplier) ^ (Department is null ? 0 : Department.GetHashCode()); hash = (hash * multiplier) ^ (Organisation is null ? 0 : Organisation.GetHashCode()); hash = (hash * multiplier) ^ (AddressLine1 is null ? 0 : AddressLine1.GetHashCode()); hash = (hash * multiplier) ^ (AddressLine2 is null ? 0 : AddressLine2.GetHashCode()); hash = (hash * multiplier) ^ (AddressLine3 is null ? 0 : AddressLine3.GetHashCode()); hash = (hash * multiplier) ^ (City is null ? 0 : City.GetHashCode()); hash = (hash * multiplier) ^ (PostCode is null ? 0 : PostCode.GetHashCode()); return(hash); } }
public override int GetHashCode() { int hash = 1; if (AddressLine1.Length != 0) { hash ^= AddressLine1.GetHashCode(); } if (AddressLine2.Length != 0) { hash ^= AddressLine2.GetHashCode(); } if (AddressLine3.Length != 0) { hash ^= AddressLine3.GetHashCode(); } if (City.Length != 0) { hash ^= City.GetHashCode(); } if (State.Length != 0) { hash ^= State.GetHashCode(); } if (ZipCode.Length != 0) { hash ^= ZipCode.GetHashCode(); } if (CountryCode.Length != 0) { hash ^= CountryCode.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hashCode = -1623438759; if (AddressLine1 != null) { hashCode += AddressLine1.GetHashCode(); } if (AddressLine2 != null) { hashCode += AddressLine2.GetHashCode(); } if (AddressLine3 != null) { hashCode += AddressLine3.GetHashCode(); } if (Locality != null) { hashCode += Locality.GetHashCode(); } if (Sublocality != null) { hashCode += Sublocality.GetHashCode(); } if (Sublocality2 != null) { hashCode += Sublocality2.GetHashCode(); } if (Sublocality3 != null) { hashCode += Sublocality3.GetHashCode(); } if (AdministrativeDistrictLevel1 != null) { hashCode += AdministrativeDistrictLevel1.GetHashCode(); } if (AdministrativeDistrictLevel2 != null) { hashCode += AdministrativeDistrictLevel2.GetHashCode(); } if (AdministrativeDistrictLevel3 != null) { hashCode += AdministrativeDistrictLevel3.GetHashCode(); } if (PostalCode != null) { hashCode += PostalCode.GetHashCode(); } if (Country != null) { hashCode += Country.GetHashCode(); } if (FirstName != null) { hashCode += FirstName.GetHashCode(); } if (LastName != null) { hashCode += LastName.GetHashCode(); } if (Organization != null) { hashCode += Organization.GetHashCode(); } return(hashCode); }