Instantiating a constructor with parameters in an internal class with reflection
问题 I have something along the lines of this: object[] parameter = new object[1]; parameter[0] = x; object instantiatedType = Activator.CreateInstance(typeToInstantiate, parameter); and internal class xxx : ICompare<Type> { private object[] x; # region Constructors internal xxx(object[] x) { this.x = x; } internal xxx() { } ... } And I get: threw exception: System.MissingMethodException: Constructor on type 'xxxx.xxx' not found.. Any ideas? 回答1: The issue is that Activator.CreateInstance(Type,