delete a all buttons from a form c# code example
Example: how to remove all buttons on a form C#
panel.Controls.OfType<Button>().ToList().ForEach(btn => btn.Dispose());
panel.Controls.OfType<Button>().ToList().ForEach(btn => btn.Dispose());