I have several classes: SomeClass1, SomeClass2.
How to create a new instance of one of these classes using the class name from a string?
Normally I would do:
var someClass1 = new SomeClass1();
How to create this instance from the following:
var className = "SomeClass1";
I suppose I should use Type.GetType () or something, but I cannot figure it out.
Thank.
source
share