// 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" }; int n = 0; foreach(string s in lst) { n++; Console.Write(" {0}", s); if((n % 3) == 0 || n == (lst.Count - 1)) Console.WriteLine(); } } }