Re: Is it possbile to enumerate Methods by Event?



athos.jingle@xxxxxxxxx <athos.jingle@xxxxxxxxx> wrote:
To attach a method to an event, we can use EventInfo.AddEventHandler.

After attached, given an event's name, is it possible to retrieve all
methods attached to it?

No. An event is really just a pair of methods, add and remove. Although
*usually* there's a delegate variable backing it, the add/remove can do
anything they want, and there's no part of an event which is a "fetch".

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
.


Loading