For the first scenario:
Activator.CreateInstance(typeof(Test), new object[] { new NewClass(...) });
This call fails because the Test class does not have a constructor that takes a single argument of type NewClass . Edit:. You have defined an implicit casting operator, but this does not work with the reflection approach of the Activator class, as it is looking for a constructor on Test that takes an argument of type NewClass and this fails. Even if the creation using the new operator works (since casting will be evaluated before the new operation). For reflection, the / clr compiler does not know that it needs to do the translation because it only looks at types.
Perhaps you intended to call ctor using NewClass2 :
Activator.CreateInstance(typeof(Test), new object[] { new NewClass2(...) });
The second call fails because you need to pass an instance of SubTest , not Test . Another way would be ok (if ctor needs Test and you pass SubTest ).
Activator.CreateInstance(typeof(NewClass), new object[] { new SubTest(...) });
MissingMethodException is right now because you are trying to call a constructor that is not defined.
source share