Esempio n. 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((DieThrows != null ? DieThrows.GetHashCode() : 0) * 397) ^ Sum);
     }
 }
Esempio n. 2
0
 public bool Equals(DiceThrowResult other)
 {
     if (Sum != other.Sum)
     {
         return(false);
     }
     if (DieThrows == null)
     {
         return(other.DieThrows == null);
     }
     return(other.DieThrows != null && DieThrows.SequenceEqual(other.DieThrows));
 }