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

python - No exponential form of the z-axis in matplotlib-3D-plots -

excel vba - VBA Proxy auto-configuration for http requests -

php - phpWord - Tables with borders in headers/footers -