private void displayAccount(BankAccount account) { if (account == null) { labelAccountBalance.Text = ""; } else { labelAccountBalance.Text = string.Format("{0, 10:N2}", account.Balance); } }
public NoSufficientFundsException(BankAccount account, decimal transactionAmount) : base("There are not sufficient funds to perform this transaction.") { this.account = account; this.transactionAmount = transactionAmount; }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { BankAccount newAccount = new BankAccount(0m); accounts.Add(newAccount); repopulateAccountsList(); listBoxBankAccounts.SelectedItem = newAccount; }