Пример #1
0
        public void Run()
        {
            List <Student> students = StudentsRepository.ChooseTypeOfGettingStudents();

            List <Student> selectedStudents = students
                                              .Where(student => GetAge(student) < 16)
                                              .ToList();

            Console.WriteLine($"Number of students younger than 16: {selectedStudents.Count}\n");

            foreach (var student in selectedStudents)
            {
                PrintData(student);
            }
        }