If you place a continue statement inside a ‘for’ loop, then code execution will move to next iteration by skipping all the lines of code after ‘Continue’ statement.EX:for(int i=0; 1<5; i++) { if(i==3) { continue; } Console.WriteLine(i.ToString()); }
Output:1245
Explanation: In third iteration code execution will be skipped once it enters into If condition and donot execute Console.WriteLine(i.ToString());
it breaks the current iteration and start next iteration. means it doesn't run code after continue and jump to the next iteration.
The continue statement skips the current iteration and moves to next iteration