/// <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 (DiseaseName != null)
         {
             hashCode = hashCode * 59 + DiseaseName.GetHashCode();
         }
         if (CountryName != null)
         {
             hashCode = hashCode * 59 + CountryName.GetHashCode();
         }
         if (Population != null)
         {
             hashCode = hashCode * 59 + Population.GetHashCode();
         }
         if (PrevalanceFactor != null)
         {
             hashCode = hashCode * 59 + PrevalanceFactor.GetHashCode();
         }
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ (CountryName != null ? CountryName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CountryCode != null ? CountryCode.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemple #3
0
 public override int GetHashCode() => Alpha2.GetHashCode() + Alpha3.GetHashCode() + CountryName.GetHashCode()
 + IsSEPAMember.GetHashCode() + IsUsingEuros.GetHashCode();
Exemple #4
0
 /// <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 (AddressId != null)
         {
             hashCode = hashCode * 59 + AddressId.GetHashCode();
         }
         if (Nickname != null)
         {
             hashCode = hashCode * 59 + Nickname.GetHashCode();
         }
         if (IsPrimary != null)
         {
             hashCode = hashCode * 59 + IsPrimary.GetHashCode();
         }
         if (CountryName != null)
         {
             hashCode = hashCode * 59 + CountryName.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();
         }
         return(hashCode);
     }
 }