How to use for loop statement in c#?

Below code shows how to use for loop statement in C# –

using System;

namespace kodehelp.csharp.basic
{
    class ForLoopStatement
    {
        public static void Main(string[] args)
        {
            //
            // create a for loop iterating from 0 and continue while
            // i is less that 10.
            //
            for (int i = 0; i < 10; i++)
            {
                
                Console.WriteLine(i);
            }

            Console.ReadLine();
        }
    }
}

one comment

  1. facebook fans says:

    Good . thanks for explaining the concept.

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.