First, change the type of the checkout
from double to bool:
bool checkout;
And then change the parsing logic to something like this
Console.WriteLine("Would you like to checkout or add more things?");
INputString = Console.ReadLine();
checkout = INputString.ToLower().Equals("yes");
if (checkout) {
// Your code here
}
Note:
In the code we're expecting the user to write "yes" to checkout.
If you'd like to type something else, then just replace that word with your desired word.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…