jeudi 30 mai 2019

why doesn't my while loop work? Can someone tell me how the error message works?

How can I restart this codeblock? My idea is if you enter a character that will return an error message. What is the condition for the loop?

string r_operation;
Console.Write("\tBitte geben Sie ihre Rechenoperation ein: ");
r_operation = Console.ReadLine();
-------------

while (?r_operation = Console.ReadLine())
{
Console.WriteLine("\tUngültige Eingabe. Bitte geben Sie nur Zahlen ein!");
}


Aucun commentaire:

Enregistrer un commentaire