public bool Update(PhoneBookEntry entry) { if (_phoneBook.ContainsKey(entry.Name) == true) { _phoneBook[entry.Name] = entry.Number; return(true); } return(false); }
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); } }
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(); }
public void Add(PhoneBookEntry entry) { // TODO: Add passed value (entry) to dictionary throw new NotImplementedException(); }
public void Add(PhoneBookEntry entry) { _phoneBook.Add(entry.Name, entry.Number); }
public void Add(PhoneBookEntry entry) { // TODO: Add passed value (entry) to dictionary _phoneBook.Add(entry.Name, entry.Number); }