foreach (Control ctrl in this.Controls) { if (ctrl.GetType() == typeof(Timer)) { MessageBox.Show("Found 1"); } }
yourForm.components
Controls
Dispose()
InitializeComponent()
for (int i = 0; i < this.Controls.Count; i++) { if (this.Controls[i].Name.Contains("timer")) { MessageBox.Show("Found it's name is ->"+this.Controls[i].Name); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)