Пример #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (total_ != null)
            {
                hash ^= Total.GetHashCode();
            }
            if (zap_ != null)
            {
                hash ^= Zap.GetHashCode();
            }
            if (nds_ != null)
            {
                hash ^= Nds.GetHashCode();
            }
            if (deb_ != null)
            {
                hash ^= Deb.GetHashCode();
            }
            if (fin_ != null)
            {
                hash ^= Fin.GetHashCode();
            }
            if (mon_ != null)
            {
                hash ^= Mon.GetHashCode();
            }
            if (oth_ != null)
            {
                hash ^= Oth.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 (Mon != null)
         {
             hashCode = hashCode * 59 + Mon.GetHashCode();
         }
         if (Tue != null)
         {
             hashCode = hashCode * 59 + Tue.GetHashCode();
         }
         if (Wed != null)
         {
             hashCode = hashCode * 59 + Wed.GetHashCode();
         }
         if (Thu != null)
         {
             hashCode = hashCode * 59 + Thu.GetHashCode();
         }
         if (Fri != null)
         {
             hashCode = hashCode * 59 + Fri.GetHashCode();
         }
         if (Sat != null)
         {
             hashCode = hashCode * 59 + Sat.GetHashCode();
         }
         if (Sun != null)
         {
             hashCode = hashCode * 59 + Sun.GetHashCode();
         }
         return(hashCode);
     }
 }