"
""
Button[,] botoes = new Button[(int)numericUpDownLinhas.Value, (int)numericUpDownColunas.Value];
for(int i = 0; i < (int)numericUpDownLinhas.Value; i++)
{
for(int j = 0; j < (int)numericUpDownColunas.Value; j++)
{
botoes[i, j].BackColor = button1.BackColor;
botoes[i, j].Size = new Size((int)numericUpDownX.Value, (int)numericUpDownY.Value);
botoes[i, j].Location = new Point(18 + j * ((int)numericUpDownX.Value + 4), 35 + i * ((int)numericUpDownY.Value + 4));
this.Controls.Add(botoes[i, j]);
}
}
Of the error in these 3 lines:
botoes[i, j].BackColor = button1.BackColor;
botoes[i, j].Size = new Size((int)numericUpDownX.Value, (int)numericUpDownY.Value);
botoes[i, j].Location = new Point(18 + j * ((int)numericUpDownX.Value + 4), 35 + i * ((int)numericUpDownY.Value + 4));
Would anyone know why?