官术网_书友最值得收藏!

  • Learn C# in 7 days
  • Gaurav Aroraa
  • 73字
  • 2021-07-08 09:51:30

continue

This helps continue the control to the next iteration of loop, and it comes with while, do, for, or foreach loops. Take a look at the following example:

private static void ContinueStatementExample() 
{ 
WriteLine("continue statement example"); 
WriteLine("continue in for loop"); 
for (int count = 0; count < 15; count++) 
{ 
if (count< 8) 
{ 
 continue; 
} 
 WriteLine($"{count}"); 
} 
} 

The preceding code bypasses the execution when the if expression evaluates to true.

主站蜘蛛池模板: 襄汾县| 江西省| 台南市| 博乐市| 长岛县| 灵台县| 安泽县| 佛教| 鹤岗市| 德清县| 罗平县| 石渠县| 息烽县| 平昌县| 团风县| 尉氏县| 利辛县| 青龙| 井陉县| 馆陶县| 景宁| 稻城县| 鱼台县| 怀宁县| 松江区| 隆德县| 芦山县| 衢州市| 错那县| 淄博市| 鄂尔多斯市| 巴彦淖尔市| 罗源县| 清水县| 宁都县| 新源县| 太湖县| 蒙自县| 化德县| 来安县| 宜章县|