// 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 { private const int N = 10; private const int M = 10; private const int MAGICK = 77; public static void Main(string[] args) { int[][] a = new int[N][]; for(int j = 0; j < N; j++) a[j] = new int[M]; a[7][3] = MAGICK; for(int i = 0; i < N; i++) { for(int j = 0; j < M; j++) { if(a[i][j] == MAGICK) { Something(i, j); goto done; } } } done: Console.WriteLine("Done"); } public static void Something(int i, int j) { Console.WriteLine(i + " " + j); } } }