Mikhail Znak Asked:2020-12-13 19:24:31 +0000 UTC2020-12-13 19:24:31 +0000 UTC 2020-12-13 19:24:31 +0000 UTC 事件的反映(如何获取订阅事件的方法) 772 任务的本质是控制对事件的订阅。如果此方法已签名,则删除对它的重复引用。您需要使用第三方方法来实现它(添加和删除事件本身一切都很容易)。我得到 EventInfo,但无法从中提取特定方法。我将一个实例传递给方法本身,其中包含此事件 c# 1 个回答 Voted Best Answer Mikhail Znak 2020-12-22T19:27:01Z2020-12-22T19:27:01Z FieldInfo[] infoEvent = getType.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField); foreach (FieldInfo item in infoEvent) { Delegate myDelegate = (Delegate)item.GetValue(obj); Delegate [] mas = myDelegate.GetInvocationList(); } https://stackoverflow.com/questions/3783267/how-to-get-a-delegate-object-from-an-eventinfo
https://stackoverflow.com/questions/3783267/how-to-get-a-delegate-object-from-an-eventinfo