C# program for Continue Statement

This is the one of the simple program from which we can easily understand about "Continue Statement".

Continue Statement is majorly use to jump to the next level of the program from the first level.

It will skip the first level which will not be displayed in the program, but execute the next level where we set the Continue statement respectively, you can follow the code below.


ENJOY CODING!!!

_____________________________________________________________________________________



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Continue_Statement
{
    class PostSlush
    {
        static void Main(string[] args)
        {
            int a = 0;
            while (a < 15)
            {
                a++;
                if (a < 5)
                {
                    continue;
                }
                Console.WriteLine(a);
            }
            Console.ReadLine();
        }
    }
}



Output :

Previous Post Next Post