CSharp examples for Custom Type:Lambda
Writes the numbers list using an expression-type lambda expression which contains only a WriteLine() call:
using System;//from w w w. j a va 2 s .co m using System.Collections.Generic; class Program { static void Main(string[] args) { List<int> numbers = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 }; numbers.ForEach(n => Console.Write("{0}, ", n.ToString())); } }