B
Broeden
Hi,
Probably an easy question.
I need to add and remove EventHandlers for different controls. The
problem is how do i prevent an eventhandler from being added twice.
This is not working
if (ctrl.GotFocus == null)
ctrl.GotFocus += new
System.EventHandler(cboHkl_GotFocus);
I'm used to Delphi before, there I had tested with"if
assigned(ctrl.GotFocus)"
How is this done with C#?
/Broeden
Probably an easy question.
I need to add and remove EventHandlers for different controls. The
problem is how do i prevent an eventhandler from being added twice.
This is not working
if (ctrl.GotFocus == null)
ctrl.GotFocus += new
System.EventHandler(cboHkl_GotFocus);
I'm used to Delphi before, there I had tested with"if
assigned(ctrl.GotFocus)"
How is this done with C#?
/Broeden