An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Do you need code like the following?
private void button1_Click(object sender, EventArgs e)
{
Button button = new Button();
button.Click += Button_Click;
this.Controls.Add(button);
}
private void Button_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello");
}
Did I misunderstand what you mean? If so, please add some detailed description.
Microsoft Q&A is an English forum, so please translate the text into English before providing it.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.