Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- W ILibrary:
- [OperationContract]
- List<Book> ListOfBorrowedBooks();
- W Library:
- public List<Book> ListOfBorrowedBooks()
- {
- List<Book> borrowedBooks = new List<Book>();
- foreach (Book b in books)
- {
- if (b.Status.BorrowedStatus)
- {
- borrowedBooks.Add(b);
- }
- }
- return borrowedBooks;
- }
- U clienta:
- LibraryClient library = new LibraryClient();
- private static void ListOfBorrowedBooks()
- {
- Console.WriteLine("List of borrowed books");
- books = library.ListOfBorrowedBooks();
- PrintBorrowedBooks();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement