BankV05.InsertCodeHere.MyCode C# (CSharp) Method

MyCode() public method

public MyCode ( ) : void
return void
        public void MyCode()
        {
            // The FIRST line of code should be BELOW this line

            BankAccount myAccount = new BankAccount("Per Laursen");

            Console.WriteLine($"Account holder is {myAccount.Name}");

            myAccount.Deposit(2000);
            Console.WriteLine($"Account balance is : {myAccount.Balance}");

            myAccount.Withdraw(1500);
            Console.WriteLine($"Account balance is : {myAccount.Balance}");

            // The LAST line of code should be ABOVE this line
        }
    }

Usage Example

        static void Main(string[] args)
        {
            InsertCodeHere theCode = new InsertCodeHere();

            theCode.MyCode();

            Console.WriteLine();
            Console.WriteLine("Press any key to close the program...");

            Console.ReadKey();
        }
InsertCodeHere