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

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -