/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/csharp/language-reference/statements/snippets/jump-statements/ContinueStatement.cs
33 строки
699 B
Petr Kulikov
C# reference: Consolidated jump statements (#27410)
08 дек 2021, 19:03
Не верифицирован
08 дек 2021, 19:03
e801280
Код
Авторство
О чём код?
namespace JumpStatements; public static class ContinueStatement { public static void Examples() { BasicExample(); } private static void BasicExample() { // <BasicExample> for (int i = 0; i < 5; i++) { Console.Write($"Iteration {i}: "); if (i < 3) { Console.WriteLine("skip"); continue; } Console.WriteLine("done"); } // Output: // Iteration 0: skip // Iteration 1: skip // Iteration 2: skip // Iteration 3: done // Iteration 4: done // </BasicExample> } }