Пример #1
0
 public int? AddCustomer(string name, Customer customer) {
     if (customers.ContainsKey(name))
         return null;
     customers.Add(name, customer);
     return 0;
 }
Пример #2
0
 public Customer GetCustomer(string name) {
     Customer customer = null;
     if (customers.TryGetValue(name, out customer))
         return customer;
     return null;
 }