Creating class instances dynamically
Hi
I have an array with class names
eg:
Tab[0] = Step1.cs
Tab[1] = Step2.cs
Tab[2] = Step3.cs
Step*.cs are windows user controls which I want to instantiate and then load onto my form during runtime. The table Tab[] contains a diiferent list of Steps depending on the input.
I do not want to explicitly say
Step1 S1 = new Step1();
Step2 S2 = new Step2() etc...
but I want to use one command to instantiate i.e instantiate Tab[i].
Could someone help.
Replies
Know the answer? Post it — somebody with the same question will find it here.