Solution: Secure Bank Account

Review the implementation of required properties, encapsulation, and method overloading in a class.

Solution: Secure Bank Account

Review the implementation of required properties, encapsulation, and method overloading in a class.
C# 14.0
using Finance;
BankAccount account = new BankAccount { AccountNumber = "123456789" };
account.Deposit(100.50m);
Console.WriteLine($"Balance after decimal deposit: ${account.Balance}");
account.Deposit("50.25");
Console.WriteLine($"Balance after string deposit: ${account.Balance}");