using System.Collections.Generic;
public string Description;
public int AmountOfBooks;
public static void Main ()
var stock = new List <Book> {
new Book {Title = "Hello", Author = "Andrew"},
new Book {Title = "Go", Author = "Mary"}};
Console.WriteLine("Please enter the name of author.");
string author_s = Console.ReadLine();
foreach (Book element in stock )
if(element.Author == author_s) {Console.WriteLine(element.Title);}