一个控件注册了多少个事件.
button2.Click -= new EventHandler(button2_Click);
button2.Click += new EventHandler(button2_Click);
Delegate[] delDirectory = button2.Click.GetInvocationList();
判断事件是否已注册
button2.Click += new EventHandler(button2_Click);
Delegate[] delDirectory = button2.Click.GetInvocationList();
判断事件是否已注册