// 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; public class IndexFun { public static void Main(string[] args) { int[,] ia = new int[3,2]; for(int i = 0; i < 3; i++) { for(int j = 0; j < 2; j++) { ia[i,j] = 10 * i + j; } } // should have been ia[2,1] ia[1,2] = 77; for(int i = 0; i < 3; i++) { for(int j = 0; j < 2; j++) { Console.Write(" " + ia[i,j]); } Console.WriteLine(); } } }