
It it possible to register an event using the System.Reflection
Mattias,
Thanks for the response...using the code you suggested I get the
following error...
~~~~~~~~~~~~~~
System.ArgumentException: Object type cannot be converted to target type.
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at System.Reflection.EventInfo.AddEventHandler(Object target, Delegate
handler)
at CKMainExeTest.frmCKMain.btnLoad_Click(Object sender, EventArgs e) in
E:\DevProjects\vb.net\CKMainExeTest\Form1.vb:line 88
~~~~~~~~~~~~~~~
Do you have any idea why this type of exception would occur?
Thanks,
Matt
Quote:
> Matt,
> >Now that I can see the events in MyObj...how do I wire them up so that
they
> >are caught when they are raised from MyObj?
> MyEvents(idx).AddEventHandler(MyObj, AddressOf YourHandlerMethod)
> Mattias
> ====================================
> http://www.msjogren.net/dotnet/
> CodeHound - The Software Developer's Search Engine
> http://www.codehound.com