Esempio n. 1
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 (Agencia != null)
         {
             hashCode = hashCode * 59 + Agencia.GetHashCode();
         }
         if (Numero != null)
         {
             hashCode = hashCode * 59 + Numero.GetHashCode();
         }
         if (Digito != null)
         {
             hashCode = hashCode * 59 + Digito.GetHashCode();
         }
         if (Saldo != null)
         {
             hashCode = hashCode * 59 + Saldo.GetHashCode();
         }
         if (Cliente != null)
         {
             hashCode = hashCode * 59 + Cliente.GetHashCode();
         }
         if (Transacoes != null)
         {
             hashCode = hashCode * 59 + Transacoes.GetHashCode();
         }
         return(hashCode);
     }
 }
        public override int GetHashCode()
        {
            var hashCode = -1904310306;

            hashCode = hashCode * -1521134295 + Numero.GetHashCode();
            hashCode = hashCode * -1521134295 + Agencia.GetHashCode();
            return(hashCode);
        }