예제 #1
0
        public bool Equals(RaceDetails raceToCompareTo)
        {
            if ((object)raceToCompareTo == null)
            {
                return(false);
            }

            return((RaceDate == raceToCompareTo.RaceDate) && (RaceDistance == raceToCompareTo.RaceDistance) && (WonPlace == raceToCompareTo.WonPlace));
        }
예제 #2
0
        //overriding Equals for List Union
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            RaceDetails r = obj as RaceDetails;

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

            return((RaceDate == r.RaceDate) && (RaceDistance == r.RaceDistance) && (WonPlace == r.WonPlace));
        }