how to write a for loop in .net code example Example: c# loop for (int i = 0; i < 10; i++) { Console.WriteLine("Value of i: {0}", i); }