private void OnNewItemAdded(Student student) { if (student.AverageRating > 4.5) { ExelentStudentAdded?.Invoke(student); } }
private void OnNewItemAdded(Student student) { var max_index = 0; foreach (var s in _Items) { max_index = Math.Max(max_index, s.Id); } student.Id = max_index + 1; var random_group = __rnd.NextValue(_Groups.ToArray()); student.GroupId = random_group.Id; if (student.AverageRating > 4.5) { ExelentStudentAdded?.Invoke(student); } }