CSharp examples for Collection:Enumerable
Use a query expression as a for loop
using System;/*from w w w .j a va 2 s .c o m*/ using System.Collections.Generic; using System.Linq; using System.IO; class Program { static void Main(string[] args) { Enumerable.Range(1, 10).ToList<int>().ForEach(n => Console.WriteLine("n = {0}", n)); } }