The problem you have here is that you are using a list with a string. What this means is that you can only ever store an unstructured entry here; suppose that you wanted to have The Hobbit as a book, and it cost 9.99. If the user entered "The Hobbit 9.99" then, when you searched for The Hobbit, you wouldn't find the book. There are a couple of options that immediately spring to mind - use a class to represent the book, e.g.:
public class Book
{
public string Name { get; set; }
public decimal Amount { get; set; }
}
Note that I'm using a decimal to represent the money, and not a string. You should always try to use the most appropriate data type.
While that solution would work, I would recommend using a
Dictionary<string, decimal>[
^] instead, if you could only ever have one instance of the book. The reason I am suggesting this is that searching for the book by the title becomes extremely trivial. You don't have to loop to find the entry, you just use the inbuilt capabilities of the dictionary. Be aware that you are going to have to prompt the user for two pieces of information to add the book; you are going to have to
ReadLine
the name first, and then do a separate
ReadLine
to read the amount.