Or you can just associate it with another handler, for example:
your old Click event handler
private void ButtonA_Click(object sender, EventArgs e)
{
}
your new Click event handler (for example, if you create a new button)
private void ButtonB_Click(object sender, EventArgs e)
{
}
then you need to remove the first handler and add a new handler:
ButtonA.Click -= this.ButtonA_Click;
ButtonA.Click += new EventHandler(ButtonB_Click);
source
share