public static int[] GetArrayX(int[,] input, int y) { int w = input.GetLength(1); int[] xArray = new int[w]; for (int j = 0; j < w; j++) { xArray[j] = input[y, j]; } return xArray; }