how to remove controls from form in c# .net code example
Example: clear controls from panel c#
//to remove all comboboxes
foreach (Control item in panel1.Controls.OfType<ComboBox>())
{
panel1.Controls.Remove(item);
}
//to remove all comboboxes
foreach (Control item in panel1.Controls.OfType<ComboBox>())
{
panel1.Controls.Remove(item);
}