public bool TransferTo(double amount, BankAccount3 another) { bool isTransferToSuccess = false; if (Withdraw(amount)) { // balance -= amount; // another.balance += amount; another.Deposit(amount); isTransferToSuccess = true; } else { Console.Error.WriteLine("TransferTo for {0} is unsuccessful", AccountHolder); } return(isTransferToSuccess); }
// Methods public void AddAccount(BankAccount3 bankAccount) { bankAccounts.Add(bankAccount); }