/// <summary> Remove book from the list.</summary> /// <param name="book"> The book to remove. </param> public void RemoveBook(Book book) { if (!IfBookExists(book)) { throw new ArgumentException("The book doesn't exist!"); } BookList.Remove(book); }
/// <summary> Remove book from the list.</summary> /// <param name="book"> The book to remove. </param> public void RemoveBook(Book book) { if (!IfBookExists(book)) { logger.Error("The book doesn't exist!"); throw new ArgumentException("The book doesn't exist!"); } BookList.Remove(book); logger.Info("Book was removed successfully"); }