d:\GIT\proj1\git pull master
private void IterateOverControl(ControlCollection controls) { if (controls == null) return; foreach (Control control in controls) { IterateOverControl(control.Controls); if (control.ContextMenu != null) { // Do something here because I know I have a context menu. } } }
IterateOverControls(this.Controls);