public void AddStudent(Student st) { if (_students.Count == MaxCountOfStudents) throw new ClassFullException("Can't add student, cuz class is full"); if (st.IsValid()) _students.Add(st); }
public void RemoveStudent(Student st) { _students.Remove(st); }