foreach(Control ctl in this.Controls)
{
switch(ctl.GetType()) //这里报错:应输入整型
{
case typeof(TextBox):
ctl.Text=string.Empty;
break;
case typeof(Label):
ctl.Text="MM";
break;
case typeof(Button):
ctl.Text="Success";
   break;
}
}