How to fix the problem of creating a 2d array of GameObjects?

public GameObject boxArr = new GameObject[5][7];

Whenever I am using this line of code, the compile time error is :-

Invalid rank specifier : expected ‘,’ or ‘]’

Please help…

// Two-dimensional array.
int[,] array2D = new int[,] { { 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 } };
// The same array with dimensions specified.
int[,] array2Da = new int[4, 2] { { 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 } };
// A similar array with string elements.
string[,] array2Db = new string[3, 2] { { “one”, “two” }, { “three”, “four” },
{ “five”, “six” } };

Instead of:

public GameObject [][]boxArr = new GameObject[5][7];

You want:

private GameObject[,] boxArr = new GameObject[5,7];