BetaCodeShareBeta

by Code Solutions Project

Simple solutions for common problems

Description:Create a button in execution and add an event to it
C#
JoseluCross
void generateButton()
{
    Button button = new Button();
    button.Text = "Button";
    button.Click += new EventHandler(Button_Click);
}

void Button_Click(object sender, EventArgs e){
    //OnClick content
}

Input example

Void

Output example

Void
×Oh snap! Something wrong