Controls Array

  • Thread starter Thread starter Guest
  • Start date Start date
Javi,

Since you are not exact is what you are trying to do, I will try my best to
answer

This will create an array of controls, it doesnt have to be textboxes can be
anything and of course you still need to add the to the form.
ArrayList myArray = new ArrayList();

TextBox myTextBox = new TextBox();

myArray.Add(myTextBox);

The other option is of course is to use the
this.Controls and do a foreach loop through the controls if you wanted to do
something with them.


--
James McCutcheon
Blog: http://www.j3technology.com/blog

Javi said:
Hi,
I need your help,I'd like to create an Array of controls with C#, the only
thing I could find about it is that one
not really an array isn't it? It's just adding new control to the form....
 
Back
Top