// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; using System.Collections.Generic; public class Program { public static void Main(String[] args) { List lst = new List { "A", "B", "C", "D", "E", "F", "G" }; foreach(IEnumerable chlst in lst.Chunk(3)) { foreach(string s in chlst) { Console.Write(" {0}", s); } Console.WriteLine(); } } }