diff --git a/Lesson_4/Task_1/Customer.cs b/Lesson_4/Task_1/Customer.cs index 0a2fa34..508e59a 100644 --- a/Lesson_4/Task_1/Customer.cs +++ b/Lesson_4/Task_1/Customer.cs @@ -12,10 +12,5 @@ Name = name; Balance = balance; } - - public void GetBalance() - { - Console.WriteLine($"Your balance is: {Balance}"); - } } } diff --git a/Lesson_4/Task_1/CustomerList.cs b/Lesson_4/Task_1/CustomerList.cs index dcd33de..cbb3484 100644 --- a/Lesson_4/Task_1/CustomerList.cs +++ b/Lesson_4/Task_1/CustomerList.cs @@ -8,6 +8,11 @@ new Customer(2, "VHarbar", 100000) }; + public void GetBalance(int id) + { + Console.WriteLine($"Your balance is: {GetBalanceById(id)}"); + } + public decimal? GetBalanceById(int id) { var customer = Customers.FirstOrDefault(x => x.Id == id); diff --git a/Lesson_4/Task_1/Task_1.csproj b/Lesson_4/Task_1/Task_1.csproj index f02677b..74abf5c 100644 --- a/Lesson_4/Task_1/Task_1.csproj +++ b/Lesson_4/Task_1/Task_1.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net6.0 enable enable