How to determine if an event is already subscribed
- by Ram
Hi,
In my .NET application I am subscribing to events from another class. The subscription is conditional. I am subscribing to events when the control is visible and de-subscribing it when it become invisible. However in some conditions I do not want to de-subscribe the event even if the control is not visible as I want the result of an operation which is happening on background thread .
Is there any way through which I can determine if a that class has already subscribed to that event.
I know we can do it in the class which will raise that event by checking event with null but I don not know how to do it in a class which will subscribe to that event.