From ef8aa4571b417aaa7355c5da90ec7fa73f7a3610 Mon Sep 17 00:00:00 2001 From: Stanislav Mykhailenko Date: Tue, 11 Apr 2023 18:23:13 +0300 Subject: [PATCH] Update Lesson 4 Task 1 --- Lesson_4/Task_1/Customer.cs | 5 ----- Lesson_4/Task_1/CustomerList.cs | 5 +++++ Lesson_4/Task_1/Task_1.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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