How to add an event to method parameters?
for example -> void CreateButton(string text,string name,Color col, eventhandler){}
So, when creating dynamically any button i want add predefined event to this button.
Button btn = new Button();
btn.click +=? the event which I added to parameter.
Thanks in advance
VulpesPosted Jan 4, 2013, 6:21 PM
and then call with a line such as this:
CreateButton("Press me", "button1", Color.Red, Button_Click);
Posted Jan 5, 2013, 3:27 PM