Is there a way to get an event delegate

I am wondering if I can get a list of event delegates of a class object?

+3
source share
1 answer

If you implemented this event yourself, you can call a GetInvocationListdelegate if you have access to it (i.e. to get a list of calls from another class, the delegate field must be public or the call list must be returned from a public method).

If this is an automatic event, then a field private, and you can call GetInvocationListfrom your class. You will need to do this and return the results from the method publicto get a list from another class.

+4
source

Source: https://habr.com/ru/post/1780647/


All Articles