Exemplo n.º 1
0
        public void GetHashCode_2InstancesWithEqualValues_ReturnEqualHashCodes()
        {
            var left  = new TimeOfDay(1, 2, 3);
            var right = new TimeOfDay(1, 2, 3);

            Assert.AreEqual(left.GetHashCode(), right.GetHashCode());
        }
Exemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (TimeOfDay != 0)
            {
                hash ^= TimeOfDay.GetHashCode();
            }
            if (player_ != null)
            {
                hash ^= Player.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            hash ^= mapCells_.GetHashCode();
            if (Status != 0)
            {
                hash ^= Status.GetHashCode();
            }
            if (TimeOfDay != 0)
            {
                hash ^= TimeOfDay.GetHashCode();
            }
            hash ^= clientWeather_.GetHashCode();
            return(hash);
        }
Exemplo n.º 4
0
 public override int GetHashCode()
 {
     return /*base.GetHashCode() ^*/ ((int)DayOfWeek ^ TimeOfDay.GetHashCode());
 }
Exemplo n.º 5
0
 public override int GetHashCode()
 {
     return(TimeOfDay.GetHashCode());
 }