예제 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (GroupType != 0)
            {
                hash ^= GroupType.GetHashCode();
            }
            if (GroupNumber.Length != 0)
            {
                hash ^= GroupNumber.GetHashCode();
            }
            if (creditLimit_ != null)
            {
                hash ^= CreditLimit.GetHashCode();
            }
            if (Active != false)
            {
                hash ^= Active.GetHashCode();
            }
            if (contactInfo_ != null)
            {
                hash ^= ContactInfo.GetHashCode();
            }
            return(hash);
        }
 /// <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 (AccountBalance != null)
         {
             hashCode = hashCode * 59 + AccountBalance.GetHashCode();
         }
         if (AvailableBalance != null)
         {
             hashCode = hashCode * 59 + AvailableBalance.GetHashCode();
         }
         if (CreditLimit != null)
         {
             hashCode = hashCode * 59 + CreditLimit.GetHashCode();
         }
         if (AmortisedLimit != null)
         {
             hashCode = hashCode * 59 + AmortisedLimit.GetHashCode();
         }
         return(hashCode);
     }
 }