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' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -