/// <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 (AccountNumber != null)
         {
             hashCode = hashCode * 59 + AccountNumber.GetHashCode();
         }
         if (BankCode != null)
         {
             hashCode = hashCode * 59 + BankCode.GetHashCode();
         }
         if (BankName != null)
         {
             hashCode = hashCode * 59 + BankName.GetHashCode();
         }
         if (BranchCode != null)
         {
             hashCode = hashCode * 59 + BranchCode.GetHashCode();
         }
         if (CheckDigit != null)
         {
             hashCode = hashCode * 59 + CheckDigit.GetHashCode();
         }
         if (CountryCode != null)
         {
             hashCode = hashCode * 59 + CountryCode.GetHashCode();
         }
         return(hashCode);
     }
 }
示例#2
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 (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Code != null)
         {
             hashCode = hashCode * 59 + Code.GetHashCode();
         }
         if (CheckDigit != null)
         {
             hashCode = hashCode * 59 + CheckDigit.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (RelatedBranch != null)
         {
             hashCode = hashCode * 59 + RelatedBranch.GetHashCode();
         }
         if (OpeningDate != null)
         {
             hashCode = hashCode * 59 + OpeningDate.GetHashCode();
         }
         return(hashCode);
     }
 }