T
Torben
For test purposes I attach an event to a control, say a TextBox
TextChanged event. At another time the same event delegate is attached
to some other control, maybe a listbox.
Same event function every where. The event function should happen only
once for that control (and then, maybe again if it is attached to the
control again).
Could I make that deattachment operation general? could the function
find out what event it is attaced? Something like
Event e = ????????;
Eventhandler ThisHandler = ????????;
e -= ThisHandler;
Any suggestions? Thanks in advance!
Best regards
Torben
TextChanged event. At another time the same event delegate is attached
to some other control, maybe a listbox.
Same event function every where. The event function should happen only
once for that control (and then, maybe again if it is attached to the
control again).
Could I make that deattachment operation general? could the function
find out what event it is attaced? Something like
Event e = ????????;
Eventhandler ThisHandler = ????????;
e -= ThisHandler;
Any suggestions? Thanks in advance!
Best regards
Torben