如果取出绑定到事件的方法数量
// 事件访问器的定义
int eventCount=0;
public event EventHandler NumberChanged {
add {
eventCount++;
numberChanged = value;
}
remove {
eventCount--;
numberChanged -= value;
}
}
或取委托数组
public event EventHandler NumberChanged;
//某个方法内
Delegate[] delegates = NumberChanged.GetInvocationList();