event handling

jedbartlet

Member
Joined
Sep 10, 2004
Messages
20
Location
UK
Is it possible to add extra parameters to event handlers. I want to add an id number to the event handler i defined so that i can see which object in the array has made the call. Is this possibele or are the only parameters allowed Object *sender, EventArgs *e? Any feed back appreciated.
 
You would normally create your own class and inherit it from System.EventArgs - then add your own public members.
Just remember when declaring your event you need to specify a delegate with your derived class as the second parameter.
 
Back
Top