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

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -