How to use continue statement in C#?

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

[csharp]
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();
}
}
}

[/csharp]

Please Post Your Comments & Reviews

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