Beispiel #1
0
 public bool Update(PhoneBookEntry entry)
 {
     if (_phoneBook.ContainsKey(entry.Name) == true)
     {
         _phoneBook[entry.Name] = entry.Number;
         return(true);
     }
     return(false);
 }
Beispiel #2
0
 public bool Update(PhoneBookEntry entry)
 {
     // TODO: Update phone book entry information. If entry does not exist, return false, otherwise update and return true;
     if (_phoneBook.ContainsKey(entry.Name))
     {
         _phoneBook[entry.Name] = entry.Number;
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #3
0
 public bool Update(PhoneBookEntry entry)
 {
     // TODO: Update phone book entry information. If entry does not exist, return false, otherwise update and return true;
     throw new NotImplementedException();
 }
Beispiel #4
0
 public void Add(PhoneBookEntry entry)
 {
     // TODO: Add passed value (entry) to dictionary
     throw new NotImplementedException();
 }
Beispiel #5
0
 public void Add(PhoneBookEntry entry)
 {
     _phoneBook.Add(entry.Name, entry.Number);
 }
Beispiel #6
0
 public void Add(PhoneBookEntry entry)
 {
     // TODO: Add passed value (entry) to dictionary
     _phoneBook.Add(entry.Name, entry.Number);
 }