Runtime exception generated when no handler subscribed to an event
Hello,
I have a user control which generates 2 events e.g. ItemSelected, ItemDoubleClicked.
When I create the user control in code and do not add a handler to one of the events, when the event fires I get "Object reference not set to an instance of an object." I am doing something wrong here? I assume I do not have to handle every event fired by my user control?
Many thanks,
Gary
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

MykonineRank #2,671 · 521 reputationPosted Mar 20, 2005, 9:04 AM EST
Andrzej WegierskiRank #1,729 · 877 reputationPosted Mar 21, 2005, 1:09 AM EST