What is the use of 'for' statement in C# programming language?

 Posted by Goud.Kv on 9/1/2014 | Category: C# Interview questions | Views: 506 | Points: 40

for is an iteration statement that executes the entire block repeatedly like do statement without using any other statements like while.

for (int i = 1; i < 9; i++)

Console.WriteLine(i); // This will print from 1 to 8

Asked In: Spotted While Learning | Alert Moderator 

Comments or Responses

Login to post response