c# iterate from for code example Example: for in c# for (int i = 0; i < 5; i++) { Console.WriteLine(i); }