public void AddBook(Book book) { try { _Books.Add(book.Title, book); } catch (ModifyBookException e) { Console.WriteLine(e.Message); } }
public void DeleteBook(Book b) { try { if (b.BorrowedBy != null) b.BorrowedBy.ReturnBook(); if (_Books.ContainsValue(b)) _Books.Remove(b.Title); } catch (DeleteBookException e) { Console.WriteLine(e.Message); } }