BankSystem.Common.Bank.AddNewAccount C# (CSharp) Метод

AddNewAccount() приватный Метод

private AddNewAccount ( BankSystem.Common.Account newAccount ) : void
newAccount BankSystem.Common.Account
Результат void
        private void AddNewAccount(Account newAccount)
        {
            foreach (Account account in this.accounts)
            {
                if (account.Customer.ID == newAccount.Customer.ID)
                {
                    throw new InvalidOperationException("Cannot have two customers with the same ID!");
                }
            }
            this.accounts.Add(newAccount);
        }
        public void AddAccount(Account newAccount)