我正在尝试更改Label text
In parent Form
fromChild form
但我收到此错误错误Object reference not set to an instance of an object.
在哪里?这是我正在使用的代码
private void btnMedicalClgList_Click(object sender, EventArgs e)
{
this.ParentForm.Controls["lblMenuItem"].Text = "Medical College List";//getting error here
ShowMedicalClgList medifrm = new ShowMedicalClgList();
medifrm.MdiParent = this.ParentForm;
this.Hide();
medifrm.Show();
}