c# - Activator.CreateInstance, : Constructor on type 'Pastel.Evolution.PurchaseOrder' not found -
i have gotten point trying create instance of class in assembly have loaded.
object obj= activator.createinstance(purchaseorder, bindingflags.nonpublic | bindingflags.instance, null, new object[] { purchaseorderdocumentbase }, null); i keep getting error :
an unhandled exception of type 'system.missingmethodexception' occurred in mscorlib.dll additional information: constructor on type 'pastel.evolution.purchaseorder' not found.
what read already:
most of people referring constructors being private. type loading has 4 constructors public. refer type not having default constructor, thing problem.
i have tried invoke first constructor has no parameters :
constractor.invoke(purchaseorder, null); i following error.
an unhandled exception of type 'system.reflection.targetexception' occurred in mscorlib.dll additional information: object not match target type.
can shed light on please.
thank in advance.
Comments
Post a Comment