We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Dynamically attaching/detaching events

This is more a windows questions than ggc question. I am dynamically attaching and detaching eventhandlers using += and -=.
However, the the event is already attached, a object null ref exception is thrown. How do I check is the event is attached or detached before add or removing it.

1 Reply

AD Administrator Syncfusion Team January 24, 2007 07:04 PM UTC

Hi James,

Thank you for being patience.

Please refer to the following link has lot of useful articles about discusses deeply about the delegates
http://search.msdn.microsoft.com/search/default.aspx?siteId=0&tab=0&query=.Net+Delegates

Also please update us the call stack on the exception, it would help us to debug your issue at the earliest.

Kindly let us know if you need any further assistance.
Have a nice day.

Best regards,
Madhan

Loader.
Live Chat Icon For mobile
Up arrow icon