Beispiel #1
0
        public void AjouterRencontreSportive(RencontreSportive rs)
        {
            if (rs == null)
            {
                throw new Exception("Rencontre Sportive fausse");
            }

            if (LiRencontreSportive.Contains(rs))
            {
                throw new Exception("Rencontre déja effectué");
            }

            else
            {
                LiRencontreSportive.Add(rs);
            }
        }
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }

            RencontreSportive other = (RencontreSportive)obj;

            if (this.Equipe1 == other.Equipe1 && this.Equipe2 == other.Equipe2)
            {
                return(true);
            }
            return(false);
        }