public CourseStudent AddStudent(Student student)
 {
     if (student.Courses.Contains(this))
     {
         return(null);
     }
     else
     {
         CourseStudent cs = new CourseStudent(this, student);
         CourseStudents.Add(cs);
         student.CourseStudents.Add(cs);
         return(cs);
     }
 }
Exemple #2
0
 /// <summary>
 /// Add a student to a couse
 /// </summary>
 /// <param name="student"></param>
 public void AddStudent(Student student)
 {
     CourseStudents.Add(student);
 }