请问这是什么问题:
private void Form2_Load(object sender, EventArgs e)
{
switch (Form2.Tag) //error
{
case "desc":
MessageBox.Show("desc");
break;
case "sms":
MessageBox.Show("sms");
break;
}
}
错误:
An object reference is required for the non-static field, method, or property System.Windows.Forms.Control.Tag.get