void generateButton() { Button button = new Button(); button.Text = "Button"; button.Click += new EventHandler(Button_Click); } void Button_Click(object sender, EventArgs e){ //OnClick content }
Void