I have no idea why this isn't working
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private Button[,] button = new Button[3, 3]{ {button1, button2, button3 },
{button4, button5, button6 },
{button7, button8, button9 } };
private void button_Click(object sender, EventArgs e)
{
}
}
I get the error
a field initializer cannot reference the nonstatic field
on all 9 Buttons