Hi Alec
No, it is not posible.
To be able to do that you have to have access to the event's backup field
which is a delegate and then you can get its invocation list.
But
1) usually those fields are private
The event doesn't give you access to the delegate. Event is simply set
of accessor methods (Add, Rmove and Invoke) So you never deal directly with
the delegate.
2) One can say "The first point is not a problem we can use reflection to
get the field". The problem is that the controls comming with the framework
don't have backup fields at all. They keep mapping tables for the events and
creates dynamically delegates only for the hooked events. What are those
tables how are they organized are Windows Forms internals.
Thus, the answer is NO.
--
B\rgds
100
Alec Dobbie said:
I have a customer control that inherits from System.Windows.Forms.Control.
Its not the worlds most complicated control but I have a problem. I'm
trying to get a count of the number of events connected to base.click. Is
this possible?