I want to instantiate a type inside parentheses, how do I do that?
var typeStr = "System.Int32";
var type = Type.GetType(typeStr);
Console.WriteLine(type);
object o = Activator.CreateInstance(type);
var i = (type instantiation) o;
That is, get the type inside the brackets at compile time
That's not how it works
var typeStr = "System.Int32";
var type = Type.GetType(typeStr);
Console.WriteLine(type);
object o = Activator.CreateInstance(type);
var i = (type) o;