So i'm writing a do while loop as a test and my code thus far looks like this:
Code: Select all
do
{
string userinput;
userinput = Convert.ToString(Console.ReadLine());
}
while (userinput != "escape");
Is it because i declared userinput inside of the loop?
Thanks in advanced