Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. W ILibrary:
  2. [OperationContract]
  3. List<Book> ListOfBorrowedBooks();
  4.  
  5.  
  6. W Library:
  7. public List<Book> ListOfBorrowedBooks()
  8. {
  9. List<Book> borrowedBooks = new List<Book>();
  10.  
  11. foreach (Book b in books)
  12. {
  13. if (b.Status.BorrowedStatus)
  14. {
  15. borrowedBooks.Add(b);
  16. }
  17. }
  18. return borrowedBooks;
  19. }
  20.  
  21. U clienta:
  22. LibraryClient library = new LibraryClient();
  23.  
  24. private static void ListOfBorrowedBooks()
  25. {
  26. Console.WriteLine("List of borrowed books");
  27. books = library.ListOfBorrowedBooks();
  28. PrintBorrowedBooks();
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement