public DocOffers(Docs docs) { if (Offer.Count >= n) { throw new LibraryException("Can't add more Offer's"); } Offer.Add("Title:\t\t" + docs.Title + "\tAuthor:\t\t" + docs.Author); docs.InLib = false; }
//возможность взять книгу public void AddBook(Docs docs) { if (Offer.Count >= n) { throw new LibraryException("Can't add more Offer's"); } else if (docs.InLib == true) { Offer.Add("Title:\t\t" + docs.Title + "\tAuthor:\t\t" + docs.Author); } else { throw new LibraryException("Book take Visitor!!"); } }