猿问

C#的GetInvocationList()有什么用?

C#的GetInvocationList()有什么用?


慕哥6287543
浏览 386回答 1
1回答

跃然一笑

如:public void Method1(..){}public void Method2(...){}EventHandler handler = new EventHandler(Method1);handler += new Eventhandler(Method2);Delegate[] delg = handler.GetInvocationList();foreach(Delegate dd in delg){dd(...);//将所有方法依次执行一次}
随时随地看视频慕课网APP
我要回答