Exemplo n.º 1
0
 public Match(Team homeTeam, Team awayTeam, int id, Score score)
 {
     HomeTeam = homeTeam;
     AwayTeam = awayTeam;
     Id = id;
     Score = score;
 }
Exemplo n.º 2
0
 public Player(string firstName, string lastName, decimal salary, DateTime dateOfBirth, Team team)
 {
     FirstName = firstName;
     LastName = lastName;
     Salary = salary;
     DateOfBirth = dateOfBirth;
     Team = team;
 }
Exemplo n.º 3
0
 public static void AddTeam(Team team)
 {
     if (teams.Any(p=> p.Name == team.Name))
     {
         throw new InvalidOperationException("The " + team.Name + " is already added to the list of Teams");
     }
     else
     {
         teams.Add(team);
     }
 }
Exemplo n.º 4
0
 private static void AddTeam(Team newTeam)
 {
     League.AddTeam(newTeam);
     Console.WriteLine("The " + newTeam.Name +" team has been added succesfully");
 }