char typeClient = \' \';
bool clientValide = false;
while (!clientValide)
{
Console.WriteLine(\"\\nEntrez le type d\'employé (c ou g) : \");
clientValide = cha
You're really close, I think something like this will work well for you:
char typeClient = ' ';
while (typeClient != 'c' && typeClient != 'g')
{
Console.WriteLine("\nEntrez le type d'employé (c ou g) : ");
var line = Console.ReadLine();
if (!string.IsNullOrEmpty(line)) { typeClient = line[0]; }
else { typeClient = ' '; }
}
basically it reads the input into the typeClient
variable when the user enters something so the loop will continue until they enter g
or c
.