Why do you want to do this?
Update : I can guess. You could try using the System.WeakReference class instead. Here's an example:
http://blog.codeinreview.com/post/2008/11/27/NET-EVENTS-(Part-3-A-Weak-Solution).aspxHTH,
Viv
>Hi,
>How could I unsubscribe all event handlers of all events of my object?
>For example, I have a classA, which contains events OnSomethingHappen and OnSomethingNotHappen. During Dispose, I would like to unsubscribe all event handler that attached to these events.
>
>Remark: the code should be dynamic as I would like to auto unsubscribe for all without need to hardcode them differently for each class.
>
>Please advice.
>
>Thank you