How to use continue statement in C#?

Below code shows how to use continue statement in csharp/C# –

using System;

namespace kodehelp.csharp.basic
{
    class Continuestatement
    {
        [STAThread]
        public static void Main(string[] args)
        {
            for (int i = 0; i <= 10; i++)
            {
                if (i % 2 == 0)
                {
                    continue;
                }
                Console.WriteLine(i);
            }
            Console.ReadLine();
        }
    }
}

Please Post Your Comments & Reviews

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.