Friday, February 21, 2014

Continue to get numbers until a certain string is entered?

The usual way to handle this is with a "while" loop.



string text = Console.ReadLine();
while(text != "done")
{
// The rest of your code goes here.

// Get the next input.
text = Console.ReadLine();
}

No comments:

Post a Comment