Hello,
With late binding, how to I create an event handler? Note this is all
VB.NET, even the assembly.class that I'm trying to late bind.
Code example:
Dim objDll As [Assembly]
objDll = [Assembly].LoadFrom("D:\My Documents\myassembly.dll")
Dim myType As Type = objDll.GetType("myassembly.myclass")
Dim obj As Object
obj = Activator.CreateInstance(mytype)
'now how do I achieve the following?
'myclass has an event called 'Helloworld'
' this does not work as obj has no
' event named helloworld???
addhandler obj.Helloworld, addressof me.myclassHelloworld
sub myclasshelloworld()
'code...
end sub
Thanks,
Glenn