c# winform中遍历控件

foreach (Control c in this.Controls)

{

if (c is ComboBox)

{

c.Enabled = false;

}

}