Update Lesson 4 Task 1

This commit is contained in:
Stanislav Mykhailenko 2023-04-11 18:23:13 +03:00
parent 9e80815935
commit ef8aa4571b
GPG key ID: 1E95E66A9C9D6A36
3 changed files with 6 additions and 6 deletions

View file

@ -12,10 +12,5 @@
Name = name;
Balance = balance;
}
public void GetBalance()
{
Console.WriteLine($"Your balance is: {Balance}");
}
}
}

View file

@ -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);

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>