AnujBank.ClientAccounts.Validate C# (CSharp) Метод

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

private Validate ( Account newAccount ) : void
newAccount Account
Результат void
        private void Validate(Account newAccount)
        {
            string clientId = newAccount.GetClientId();
             if (accounts.Any(account => account.GetClientId() != clientId))
             {
            throw new ArgumentException("Account from two different clients cannot be added.");
             }
        }