c# - Copy EventHandler of a Control to another -
i have button (button1) , how can copy it's click property (i mean button1.click) button (button2), like:
button2.click=button1.click;
you cannot this. events allow add or remove handlers, cannot list of of handlers have. function intentionally removed you.
you keep track of handlers assign particular button yourself, independently, , add handlers button, accomplish effect.
Comments
Post a Comment