I am woundering if anyone can help me please. I have a form that has been created during runtime. I can get the name of one control in the collection and want to access a number of other controls that relate to this, they all have a common denominator, a number added to a standard name.

Is there anyway to access these controls without continually iterating through the controls collection?


You could use :

if ( Myform.Controls.Contains(MyButtonNr1)
  //do something