常用方法
常用方法
常用方法
常用方法
/// <summary> /// Adds a new account if it doesn't exist. /// </summary> public void AddBankAccount(BankAccount account) { CheckAccount(account); bool hasAccount = _storage.AccountExists(account); if (!hasAccount) { _storage.AddAccount(account); } else { throw new Exception("Our storage already has this account."); } }