From 31801ad9ceed7f3096bf05cfa47a8c8933c01fa8 Mon Sep 17 00:00:00 2001 From: Stanislav Mykhailenko Date: Sun, 19 Mar 2023 13:12:21 +0200 Subject: [PATCH] Update Lesson 2 Task 3 --- Lesson_2/Task_3/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lesson_2/Task_3/Program.cs b/Lesson_2/Task_3/Program.cs index 030975b..a5c7ea7 100644 --- a/Lesson_2/Task_3/Program.cs +++ b/Lesson_2/Task_3/Program.cs @@ -26,14 +26,14 @@ do name = Console.ReadLine(); } while (name == null); -var selected = from s in customers where s.Name == name select s; +var selected = from customer in customers where customer.Name == name select customer; foreach (Customer customer in selected) { Console.WriteLine(customer); } -var number = selected.Where(s => s.Age >= 18).Count(); +var number = selected.Where(customer => customer.Age >= 18).Count(); Console.WriteLine("Amount of customers older than 18: " + number);