Type type = typeof(MyObject<>).MakeGenericType(objectType);
object myObject = Activator.CreateInstance(type);
Also – watch out; Type.GetType(string)
only checks the executing assembly and a few system assemblies; it doesn’t scan everything. If you use an assembly-qualified-name you should be fine – otherwise you may need to get the Assembly
first, and use someAssembly.GetType(string)
.