I'm writing a program in c#, in which I create a flowlayoutpanel that contains a lot of panels. I have a button, and when the user clicks on it, I want to dispose the panels that I've created.
This is the code:
Code:
foreach (Control c in myFlowLayoutPanel.Controls)
{
((Panel)c).Dispose();
}
Leave a comment: