Use Continue to skip current loop - CSharp Language Basics

CSharp examples for Language Basics:continue

Description

Use Continue to skip current loop

Demo Code

using System;/*from  w w  w.  j  a v a2  s  . c  o  m*/
class Counting
{
   public static void Main()
   {
      for (int i = 0; i <= 20; i++)
      {
         if (i % 4 == 0)
            continue;
         Console.Write(i + ", ");
      }
   }
}

Result


Related Tutorials