RemoveClickEvent

public static void RemoveClickEvent(this Button btn)
{
    FieldInfo f1 = typeof(Control).GetField("EventClick", BindingFlags.Static | BindingFlags.NonPublic);
    if (f1 != null)
    {
        object obj = f1.GetValue(btn);
        PropertyInfo pi = btn.GetType().GetProperty("Events", BindingFlags.NonPublic | BindingFlags.Instance);
        EventHandlerList list = (EventHandlerList)pi.GetValue(btn, null);
        list.RemoveHandler(obj, list[obj]);
    }
}
Example:
btnTest.RemoveClickEvent();

Description

Remove click event from given button.

Details

Double click on the code to select all.

 

;