I'm working on a program where I want my user to enter one of the following Colors (Red, Green or Black). But I am stuck.
What I have done so far is this
Console.Write("Color To Bet on: ");
string tempColor = Console.ReadLine();
while (String.IsNullOrWhiteSpace(tempColor))
{
Console.Write("The color can't be null.");
tempColor = Console.ReadLine().ToLower();
}
But how can I make sure my users puts in the color I want, I've tried fiddling around with string. Contains method but haven't had any success so far.