how to remove all buttons on 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());