GetInvocationList() equivalent in vb
-
Hi, How can i access the individual delegates attached to an Event? In C#, I can use the GetInvocationList() Method on a Delegate. How can i do this in vb.Net? Thanks, Zor
-
Thanks Graus... well, i did'nt explain it properly. I need to be able to access individual delegates attached to an Event. Lets look at a simple scenario...
Class MyClass
Public Delegate Sub MyDelegate(...)
Public Event MyEvent As MyDelegateprotected Sub OnMyEvent(...)
'RaiseEvent MyEvent(...) ' I do not want to do it this way. ' I want to be able to loop through each delegate attached to the event. . . **MyEvent.GetInvocationList()** ' VB Compiler does not allow this. . .
end Sub
end class
Thanks, Zor
-
Thanks Graus... well, i did'nt explain it properly. I need to be able to access individual delegates attached to an Event. Lets look at a simple scenario...
Class MyClass
Public Delegate Sub MyDelegate(...)
Public Event MyEvent As MyDelegateprotected Sub OnMyEvent(...)
'RaiseEvent MyEvent(...) ' I do not want to do it this way. ' I want to be able to loop through each delegate attached to the event. . . **MyEvent.GetInvocationList()** ' VB Compiler does not allow this. . .
end Sub
end class
Thanks, Zor
Off the top of my head here, shouldn't that highlighted line you posted read:
Dim callbackList() As MyDelegate
callbackList = MyDelegate.GetInvocationList()???? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Off the top of my head here, shouldn't that highlighted line you posted read:
Dim callbackList() As MyDelegate
callbackList = MyDelegate.GetInvocationList()???? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome