// 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 Params12 { public static void Test(params int[] v) { foreach(int v1 in v) Console.Write(" {0}", v1); Console.WriteLine(); } public static void Main(string[] args) { Test(1); Test(1, 2); Test(1, 2, 3); } }