Exemple #1
0
 public static void Main()
 {
     if (Account.AccountAllowed(25000, 21))
     {
         Console.WriteLine("Allowed Account");
     }
 }
Exemple #2
0
    public static void Main(string[] args)
    {
        // ---PLAYING WITH STATIC MEMBERS AND METHODS---

        // Creating an instance of Account
        Account me = new Account(1000, 37);

        // Calculating if account is allowed
        if (Account.AccountAllowed(me.Balance, me.Age))
        {
            Console.WriteLine("Account allowed");
        }
        else
        {
            Console.WriteLine("Account not allowed");
        }

        // Depositing funds into the account
        me.DepositFunds(20);

        me.ShowCurrentBalance().PrintToConsole();

        Console.ReadLine();
    }