continue

The continue; statement allows the program to skip the execution of statements until the end of that code block and continues with the next iteration. For example, in a for loop of 1..10, if the continue statement is placed within an expression, that is, i <= 5, it looks at all 10 numbers, but the action will only be performed on 6, 7, 8, 9, and 10:

for (int i = 1; i <= 10; i++)
{
if (i <= 5)
{
continue;
}
Console.WriteLine(i);
}
//output
6
7
8
9
10

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.137.67