Example #1
0
 public void transferfrom(banckaccountt accfrom, decimal amount)
 {
     if (accfrom.withdraw(amount))
     {
         this.deposit(amount);
     }
 }
Example #2
0
        public static void testwithdraw(banckaccountt acc)
        {
            Console.Write("Enter amount to withdraw: ");
            decimal amount = decimal.Parse(Console.ReadLine());

            if (!acc.withdraw(amount))
            {
                Console.WriteLine("sorry! ..you haven't enough money");
            }
        }