What is that collection of controls you want to change? All the controls? Controls from a list of names?
- TopLevelControl.Controls retrieves all controls on the form.
- TopLevelControl.Controls.Find(name, true) retrieves all controls with a specific name.
You can then cast the control to whichever type you need and set its ImageIndex to the value you want.
If you want to set the ImageIndex property but you don't know the type of the control, you can use reflection on the controls retrieved:
control.GetType().GetProperty("ImageIndex").SetValue(control, value, null);