public void transferfrom(banckaccountt accfrom, decimal amount) { if (accfrom.withdraw(amount)) { this.deposit(amount); } }
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"); } }