how to use getinvocationlist on an event

L

Lore Leunoeg

Hello again.

My code adds several EventHandlers to the same Event-Delegate. Thereafter
I 'd like to get a list of all the handlers added. I found that events are
some kind of multicast delegates and that it should be possible to get the
list with den GetInvocationList-Method of the Delegate. But I really don't
succeed to do this.

ClickButton is the class that holds the delegate and the event (ClickEvent)
and fires the event.

Sub Main(ByVal CmdArgs() As String)
Dim button As ClickButton = New ClickButton()

AddHandler button.ClickEvent, AddressOf ClickHandler1
AddHandler button.ClickEvent, AddressOf ClickHandler2
AddHandler button.ClickEvent, AddressOf ClickHandler3

'GetInvocationList
End Sub


What is the object on that I can call GetInvocationList???

Thank you
Sincerely
Lore
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top