// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; class MainClass { public static void Main(string[] args) { string[] a = { "a", "bb", "ccc" }; string res = ""; for(int i = 0; i < a.Length; i++) { if(i > 0) res = res + " "; res = res + a[i]; } Console.WriteLine(res); res = ""; foreach(string s in a) { if(s != a[0]) res = res + " "; res = res + s; } Console.WriteLine(res); } }