if statement - C# Error with 'continue' -


i'm trying use if statement bool make if code runs once not run again. here code using.

int random = program._random.next(0, 133);  if (random < 33) {    bool done = false;     if(done)    {       continue; // error shown statement    }     console.writeline("not done!");    done = true; } 

the error visual studio displaying is: "no enclosing loop out of break or continue".

depending on class/method requirements, possibly reverse logic:

 if (!done)  {    console.writeline("not done!");    done = true;  } 

Comments

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

php - Using str_replace to translate a MySQL Table in html -

asp.net mvc - Cannot display error message on Editor or EditorFor -