// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; public class Program { public static void Demo(params int[] v) { int n = v.Length; for(int i = 0; i < n; i++) { int v1 = v[i]; Console.Write(" {0}", v1); } Console.WriteLine(); } public static void Main(string[] args) { Demo(1); Demo(1, 2); Demo(1, 2, 3); } }