public void ReturnBooks() { StackLibary stackBooks = new StackLibary(); //Write's if there are any books //And if there is write all the books try { foreach (string e in StackLibary.bookStack) { Console.WriteLine(e); } } catch { Console.WriteLine("No book"); } Console.WriteLine("Do you want to return the book? yes/no"); userI = Console.ReadLine().ToLower(); if (userI == "yes") { ReturnB(); } }
void TakeBook() { StackLibary stack = new StackLibary(); while (true) { Console.Clear(); Console.WriteLine("Books avaible"); stack.BooksAvaible(); Console.WriteLine(""); Console.WriteLine("What book you want to take?"); userBook = Console.ReadLine(); stack.StackFunction(); return; } }