GetClientId() public méthode

public GetClientId ( ) : string
Résultat string
Exemple #1
0
 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.");
      }
 }
Exemple #2
0
        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.");
            }
        }