private static bool[,] horizontal = new bool[10, 10];
private static bool[,] vertical = new bool[10, 10];
private static void Build()
for (int i = 0; i < vertical.GetLength(0); i++)
for(int j = 0; j < vertical.GetLength(1); j++)
for (int i = 0; i < horizontal.GetLength(0); i++)
for(int j = 0; j < horizontal.GetLength(1); j++)
private static void InvokeMe()
int hz = horizontal.GetLength(0) * horizontal.GetLength(1);
int vr = vertical.GetLength(0) * vertical.GetLength(1);
int hzcol = horizontal.GetLength(1);
int vrcol = vertical.GetLength(1);
for (int i = 0; i < hz; i++)
if(horizontal[i / hzcol, i % hzcol] == true)
System.Console.WriteLine("True, on position: {0},{1}", i / hzcol, i % hzcol);
for (int i = 0; i < vr; i++)
if(vertical[i / vrcol, i % vrcol] == true)
System.Console.WriteLine("True, on position: {0},{1}", i / vrcol, i % vrcol);
public static void Main()