Exemple #1
0
        // equality comparator based solely on name, for now
        public override bool Equals(object obj)
        {
            Race other = obj as Race;

            if (other == null)
            {
                return(false);
            }
            return(RaceName.Equals(other.RaceName));
        }
Exemple #2
0
        public override bool Equals(object obj)
        {
            var item = obj as RaceData;

            if (item == null)
            {
                return(false);
            }

            var different = Horses.Except(item.Horses).ToList();

            return(RaceName.Equals(item.RaceName) &&
                   Horses.SequenceEqual(item.Horses) &&
                   Prices.SequenceEqual(item.Prices));
        }