Esempio n. 1
0
        /// <inheritdoc/>
        public override int GetHashCode()
        {
            // Overflow is fine, just wrap.
            unchecked
            {
                int hash = 17;

                hash *= 23 + DateTime1.GetHashCode();
                hash *= 23 + DateTime2.GetHashCode();
                hash *= 23 + Date1.GetHashCode();
                hash *= 23 + Date2.GetHashCode();

                return(hash);
            }
        }
Esempio n. 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Number1.GetHashCode();
         hashCode = (hashCode * 397) ^ Number2.GetHashCode();
         hashCode = (hashCode * 397) ^ Number3.GetHashCode();
         hashCode = (hashCode * 397) ^ (Numbers?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ Dec1.GetHashCode();
         hashCode = (hashCode * 397) ^ Dec2.GetHashCode();
         hashCode = (hashCode * 397) ^ Date1.GetHashCode();
         hashCode = (hashCode * 397) ^ Date2.GetHashCode();
         return(hashCode);
     }
 }