G
Guest
I'm trying to dynamically create an instance of of a class, and it's always
failing. I'm using the Activator.CreateInstance( Type, Object[] ) overload.
The class I'm trying to instaniate and call a method from is a public class
from another project in the solution.
The Assembly is loaded fine, but whenever I try to instaniate the class, I
get a MissingMethodException exception, stating that, "Constructor on type
'...' not found". The class is found in the list of classes, and the method
is found in the list of methods.
On step-through debugging, the parameters I pass to the CreateInstance()
method are correct -- that is, the first parameter is the correct class type
and the second parameter is an array of objects that match the only public
constructor of the class I'm trying to instantiate.
Does anyone have any idea why, when everything seems correct, I'm still
getting this exception?
failing. I'm using the Activator.CreateInstance( Type, Object[] ) overload.
The class I'm trying to instaniate and call a method from is a public class
from another project in the solution.
The Assembly is loaded fine, but whenever I try to instaniate the class, I
get a MissingMethodException exception, stating that, "Constructor on type
'...' not found". The class is found in the list of classes, and the method
is found in the list of methods.
On step-through debugging, the parameters I pass to the CreateInstance()
method are correct -- that is, the first parameter is the correct class type
and the second parameter is an array of objects that match the only public
constructor of the class I'm trying to instantiate.
Does anyone have any idea why, when everything seems correct, I'm still
getting this exception?