Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

do...while loop

$
0
0

So I've only been writing in C# for about a day now, and I've been searching the internet for almost an hour and can't seem to find something like my code that actually works. Looks like this:

do
{
Console.WriteLine("Play again?");
string play = Console.ReadLine();
}
while (play == "yes");

Is this not possible, do I need to find a different method to do this? Anything would help, thank you.  


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>