пытаюсь создать двух мерный массив label'ов.
| Код | public partial class Form1 : Form { public Form1() { InitializeComponent(); } private System.Windows.Forms.Label label[]; private void InitializeComponent(); private void Form1_Load(object sender, EventArgs e) { int i; label = new System.Windows.Forms.Label[15, 15]; for(i = 0; i < label.Length; i++) label[i] = new Label(); for (int i=0; i<9; i++) { this.label[i, i].Location = new System.Drawing.Point(i * 9, i * 9); }
} }
|
вот в этом месте private System.Windows.Forms.Label label[]; выдаёт : Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type. что не так, помогите пожалуйста! |