Update Lesson 4 Task 1
This commit is contained in:
parent
9e80815935
commit
ef8aa4571b
3 changed files with 6 additions and 6 deletions
|
@ -12,10 +12,5 @@
|
|||
Name = name;
|
||||
Balance = balance;
|
||||
}
|
||||
|
||||
public void GetBalance()
|
||||
{
|
||||
Console.WriteLine($"Your balance is: {Balance}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
|
Reference in a new issue