G
Guest
What I really want to do is something like this:
Main {
string classToInstantiate;
if (something) classToInstantiate = "class1";
if (something) classToInstantiate = "class2";
fn(classToInstantiate);
}
fn (string theClass) {
// logic to instantiate the class that is the value of theClass
}
Any Help will be greatly appreciated.
Alex
Main {
string classToInstantiate;
if (something) classToInstantiate = "class1";
if (something) classToInstantiate = "class2";
fn(classToInstantiate);
}
fn (string theClass) {
// logic to instantiate the class that is the value of theClass
}
Any Help will be greatly appreciated.
Alex