C# Continue Statements

The continue statements enables you to skip the loop and jump the loop to next iteration.

Example:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace Continue_Statements_Example
{
 class Program
 {
 static void Main(string[] args)
 {
 int i = 0;
 while (i < 10)
 {
 i++;
 if (i < 6)
 {
 continue;
 }
 Console.WriteLine(i);
 }
 Console.ReadLine();
 }
 }
}

Leave a Reply

Your email address will not be published. Required fields are marked *