Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. try
  2. {
  3.  
  4. b = new Book("I promessi sposi", p = new Person("Alessandro", "Manzoni"), "Istituto Italiano di Arti Grafiche-Editore", 1827);
  5. b = new Book("Il nome della rosa", p2 = new Person("Umberto", "Eco"), "Bompiani", 1980);
  6.  
  7. List<Person> Authors = new List<Person>();
  8. Authors.Add(p = new Person("Alessandro", "Manzoni"));
  9. Authors.Add(p = new Person("Umberto", "Eco"));
  10. Authors.Add(p = new Person("Galileo", "Galilei"));
  11.  
  12. Person pp;
  13. pp = Authors.Find(x => x.Name == "Galileo");
  14. if (p is Person)
  15. {
  16. textBoxShow.Text = pp;
  17. }
  18. foreach (Person p in Authors)
  19. {
  20. //textBoxShow.Text = p;
  21. }
  22.  
  23.  
  24. //textBoxShow.Text = b.Title + " di " + p.Name + " " + p.Surname + " pubblicato da " + b.PublishingHouse + " e pubblicato il " + b.YearOfPublication;
  25.  
  26.  
  27. }
  28. catch (Exception exc)
  29. {
  30. MessageBox.Show(exc.Message);
  31. }
  32. }
  33.  
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement