public void UpdateBook(Book book) { foreach (Book b in books) { if (ReferenceEquals(b, book)) { b.Title = book.Title; b.Author = book.Author; b.ReleaseDate = book.ReleaseDate; b.Genre = book.Genre; } } foreach (Book b in books) { Console.WriteLine(b.Title + b.Author + b.Genre); } UpdateBookEvent?.Invoke(book); }
public void UpdateBook(Book book) { UpdateBookEvent?.Invoke(book); }