这就是我试图实现我的 PictureBox 数组的方式:
PictureBox[] column0 = new PictureBox[6];
PictureBox[] column1 = new PictureBox[6];
PictureBox[] column2 = new PictureBox[6];
PictureBox[] column3 = new PictureBox[6];
PictureBox[] column4 = new PictureBox[6];
PictureBox[] column5 = new PictureBox[6];
PictureBox[] column6 = new PictureBox[6];
PictureBox[][] columns =
new PictureBox[][]
{ column0, column1, column2, column3, column4, column5, column6 };
当我尝试创建数组数组时,出现此错误:
字段初始值设定项不能引用非静态字段方法或属性“Connect_Four_Server.Server.column0”
以及 column1、column2 等的相同错误。
在这种情况下如何正确声明数组?