标签:div this string class typeof each user nbsp color
foreach (Control ctm in this.Controls) { if (ctm.GetType() == typeof(ComboBox) && ctm.Text.ToString() == "")//ComBobox为空 { panelAdd.Controls.Remove(ctm); iUser -= 1; } }
这里要注意的是,这类combobox大多在panel中,所以this 要改成所在panel的Name
标签:div this string class typeof each user nbsp color
原文地址:http://www.cnblogs.com/net-syc/p/7269054.html