BindingFlags _SEARCH_BINDINGFLAGS = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | ClearEventHandler( targetObj, Type targetType = EventInfo eventInfo = (eventInfo == ) ArgumentException( Delegate[] eventInvocationList = (Delegate handler Delegate[] GetEventInvocationList( targetObj, FieldInfo eventFieldInfo = GetEventField(targetObj.GetType(), eventName, (eventFieldInfo != eventFieldValue = (eventFieldValue } PropertyInfo propertyInfo = targetObj.GetType().GetProperty( (propertyInfo != EventHandlerList eventHandlerList = propertyInfo.GetValue(targetObj, ) (eventHandlerList != Delegate eventHanlder = (eventHanlder != FieldInfo GetEventField(Type target, eventName, FieldInfo eventInfo = (inherited && eventInfo == (target.BaseType != (target.BaseType == eventInfo = GetEventField(target.BaseType, + eventName, eventInfo = GetEventField(target.BaseType, eventName, EventInfo GetEvent(Type target, }
PS: This Demo has many shortcomings and is for reference only. Please advise me to help the younger brother improve and improve it.