Một tuyên bố continue thường được dùng để bỏ qua các lệnh lặp với một điều kiện cho trước trong: while, do, for, foreach

Các bạn xem mã sau:


class ContinueTest
{
static void Main()
{
for (int i = 1; i <= 10; i++)
{
//nếu i vẫn bé hơn 9 thì bỏ qua hết.

if (i < 9)
{
continue;
}
Console.WriteLine(i);
}


Console.WriteLine("Press any key to exit.");
Console.ReadKey();
}
}
/*
Output:
9
10
*/

thumbnail 013. Keyword [continue]

data:label.name author

premiumpng.com

Design Publisher

Download 0
No comments
Template in .PSD format

MR Laboratory License

Free for personal purpose use . More info


Buy Now This Template

No comments:

Post a Comment

Commets Download Photoshop Actions, Lightroom Presets, PSD Template, Mockups, Stocks, Vectors, Fonts. Download free

Newer Post Older Post Home

Copyright © 2021 MR Laboratory All rights reserved.

Setting