public void AddStudent(Student student) { if (students.Contains(student)) { throw new ArgumentException("The student has already been added."); } this.students.Add(student); }
public void RemoveStudent(Student student) { this.students.Remove(student); }