Removing and adding event handlers using reflection

Recently I ran into an situation that I need to remove all the event handlers, perform some work and then re-attach all the event handlers.

Tagged with: ,
Posted in C# Programming
2 comments on “Removing and adding event handlers using reflection
  1. Jonathan says:

    Who would have thought your post would have helped someone four years after you posted it. I just implemented this trick to work around a bug in a framework I am using.

  2. dbardi says:

    How would this work for an event on a static method?

Leave a Reply