I'm using Assembly.Create Instance (3rd overload) to create an instance of one of the types included on that dll.
But what the hell are the bindingflags? I get this exception:
MissingMethodEx ception
Constructor not Found on class ...
Source: mscorlib
TargetSite:Syst em.Object CreateInstanceI mpl(System.Refl ection.BindingF lags, System.Reflecti on.Binder, System.Object[], System.Globaliz ation.CultureIn fo, System.Object[])
STACKTRACE:
at System.RuntimeT ype.CreateInsta nceImpl(Binding Flags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttri butes)
at System.Activato r.CreateInstanc e(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttri butes)
at System.Reflecti on.Assembly.Cre ateInstance(Str ing typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttri butes)
at Legion.Comun.fr mABM.EjecutarCo mandoDeMenu(Com andoEnum Comando) in C:\Mis Documentos\Proy ectos de Visual Studio\Local\Le gion\Legion.Com un\frmABM.vb:li ne 324
I only want to access the default constructor.
Thanks very much
But what the hell are the bindingflags? I get this exception:
MissingMethodEx ception
Constructor not Found on class ...
Source: mscorlib
TargetSite:Syst em.Object CreateInstanceI mpl(System.Refl ection.BindingF lags, System.Reflecti on.Binder, System.Object[], System.Globaliz ation.CultureIn fo, System.Object[])
STACKTRACE:
at System.RuntimeT ype.CreateInsta nceImpl(Binding Flags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttri butes)
at System.Activato r.CreateInstanc e(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttri butes)
at System.Reflecti on.Assembly.Cre ateInstance(Str ing typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttri butes)
at Legion.Comun.fr mABM.EjecutarCo mandoDeMenu(Com andoEnum Comando) in C:\Mis Documentos\Proy ectos de Visual Studio\Local\Le gion\Legion.Com un\frmABM.vb:li ne 324
I only want to access the default constructor.
Thanks very much
Comment