在C#应用程序,我们可以添加一个事件处理程序像this.button3.Click += new System.EventHandler(this.button3_Click);
我们也可以删除this.button3.Click -= new System.EventHandler(this.button3_Click);
所以这意味着我们可以在UI控件添加尽可能多的,因为我们希望活动的,所以我的问题是如何能我探索或迭代并从UI中删除特定事件。例如,如果我们可以在一个列表框(如果可能的话)填充控件的所有事件并删除所选的一个。探索/迭代UI事件的
PS:我还是一个初级程序员,所以我认为代码反射处理这部分。 最好成绩
可能的重复http://stackoverflow.com/questions/5989889/store-a-list-of-eventhandlers-to-unsubscribe-from – oleksii 2011-05-30 13:39:02