Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Seconds != null ? Seconds.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Minutes != null ? Minutes.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Hours != null ? Hours.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DaysOfMonth != null ? DaysOfMonth.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Months != null ? Months.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DaysOfWeek != null ? DaysOfWeek.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemplo n.º 2
0
        public override int GetHashCode()
        {
            unchecked {
                int hash = 17;
                if (Weekdays != default(Weekdays[]))
                {
                    hash = hash * 23 + Weekdays.GetHashCode();
                }
                if (DaysOfMonth != default(int[]))
                {
                    hash = hash * 23 + DaysOfMonth.GetHashCode();
                }
                if (WeekdayOfMonth != default(String))
                {
                    hash = hash * 23 + WeekdayOfMonth.GetHashCode();
                }

                return(hash);
            }
        }