是否可以使用反射从类私有字段_invocationList外部访问?
我试过
var bindingFlags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
Type type = common.GetType();
var myEvent = type.GetEvent("OnTransformerTypeChanged");
var myfields = myEvent.GetType().GetFields(BindingFlags.NonPublic |BindingFlags.Instance);
或
var myfields = myEvent.GetType().GetField("_invocationList", BindingFlags.NonPublic | BindingFlags.Instance);