Пример #1
0
 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);
 }
Пример #2
0
 public void UpdateBook(Book book)
 {
     UpdateBookEvent?.Invoke(book);
 }