using System; using System.Collections.Generic; namespace demo { class Program { static void Main(string[] args) { List<String> names = new List<String>(); names.Add("Bruce"); names.Add("Alfred"); names.ForEach(Print); names.ForEach(delegate (String name) { Console.WriteLine(name); }); } private static void Print(string s) { Console.WriteLine(s); } } }