C# How to I escape 2 lines of loops -


this code:

while(true){     for(int x = 0; x < 10; x++){         stringarray[x] = new string();         if(isdead){             break; //break out of while loop         }     } } 

how should please, sorry if english good,i still learning.

you create bool example:

bool leaveloop; 

and if isdead true set leaveloop true, in while loop check if leaveloop true break it.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -