How to break For Loop....
C#
3
Posts
3
Posters
0
Views
1
Watching
-
You just said it. Use break. Something like this:
for (int i = 0; i < 5; i++) { //Do some stuff //break if i is 3 if (i==3) { break; } }
#region signature my articles #endregion
-
Can I point out here that it is generally a bad idea to break out of a loop. This normally means that there is a problem with the design.
Deja View - the feeling that you've seen this post before.