예제 #1
0
 public Match(Team homeTeam, Team awayTeam, int id, Score score)
 {
     HomeTeam = homeTeam;
     AwayTeam = awayTeam;
     Id = id;
     Score = score;
 }
예제 #2
0
 public Player(string firstName, string lastName, decimal salary, DateTime dateOfBirth, Team team)
 {
     FirstName = firstName;
     LastName = lastName;
     Salary = salary;
     DateOfBirth = dateOfBirth;
     Team = team;
 }
예제 #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);
     }
 }
예제 #4
0
 private static void AddTeam(Team newTeam)
 {
     League.AddTeam(newTeam);
     Console.WriteLine("The " + newTeam.Name +" team has been added succesfully");
 }