I've been given some code that I am calling through multicast delegate.
I would like to know how I can catch up and manage any exception raised there and that is not managed for the moment. I cannot modify the code given.
I've been looking around and found about the need to call GetInvocationList() but not really sure if this is helpful.
Consider the code using
GetInvocationList
:This my old approach, the newer approach I prefer is above because it makes invocation a snap, including the use of out/ref parameters (if desired).
which individually calls each delegate that would have been invoked with
Happy coding.
Remember to do the standard null-guard copy'n'check (and perhaps lock) when dealing with events.