G
Guest
Hi all
Is there any way to create an instance of a class using its type?
I mean something like this:
private void util() {
object a = null;
a = CreateObjectByType(typeof(MyClassA));
}
private object CreateObjectByType(Type classType) {
...
}
Thank you
Is there any way to create an instance of a class using its type?
I mean something like this:
private void util() {
object a = null;
a = CreateObjectByType(typeof(MyClassA));
}
private object CreateObjectByType(Type classType) {
...
}
Thank you