I guess what I have to do is quite simple, but I'm really stuck!
I need to create, in a form, a particular number "i" of "Button"s (i is given at runtime), whose reference name should be "button1","butt on2", ...
I mean something like: Button button1 = new System.Windows. Forms.Button(); ...
So I tried with a "for" looping i times, ech time to create a new Button called button; I wrote a function that, given parameter i, returns the string "button<i>" .
This function is called each loop, but I can't manage to make this "button<i>" string become the reference name of the new created button, thus getting a separate object from the previous.
I hope to have been clear.
Thanx a lot in advance, for whoever'll try to help me!
Davide
//Trying desperetely to end up my thesis on time
I need to create, in a form, a particular number "i" of "Button"s (i is given at runtime), whose reference name should be "button1","butt on2", ...
I mean something like: Button button1 = new System.Windows. Forms.Button(); ...
So I tried with a "for" looping i times, ech time to create a new Button called button; I wrote a function that, given parameter i, returns the string "button<i>" .
This function is called each loop, but I can't manage to make this "button<i>" string become the reference name of the new created button, thus getting a separate object from the previous.
I hope to have been clear.
Thanx a lot in advance, for whoever'll try to help me!
Davide
//Trying desperetely to end up my thesis on time
Comment