// 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; namespace E { public class Program { public static void Test(int[] a) { foreach(int v in a) { Console.WriteLine(v); } } public static void Main(string[] args) { int[,] a1 = new int[2,2]; a1[0,0] = 1; a1[0,1] = 2; a1[1,0] = 3; a1[1,1] = 4; // umuligt at kalde Test med a1 int[][] a2 = new int[2][]; a2[0] = new int[2]; a2[1] = new int[2]; a2[0][0] = 1; a2[0][1] = 2; a2[1][0] = 3; a2[1][1] = 4; Test(a2[0]); Test(a2[1]); } } }