public DevicesForm() { InitializeComponent(); mstr = new mStr[32]; for (int i = 0; i < 32; i++) { mstr[i] = new mStr(); mstr[i].dt = DateTime.Now; mstr[i].key = (i + 1); foreach (Control control in this.Controls) { if (control.Tag.ToString() == mstr[i].key.ToString()) { mstr[i].mLabel = control as Label; break; } } } }