I can't work out how to get the parameter types for an event.
For instance, I can only see using a MethodInfo to get parameters, but I have either an EventInfo or a FieldInfo.
What I want is to be able to get 'Boolean' from this:
Public Event EventName(ByVal sender As Object, ByVal value As Boolean)
You can get the type of the second parameter as follows assuming the event
EventName is declared in the class
DeclaringClass and the event has at least to parameters. Else you will probably receive an exception.
Type secondEventHandlerParameterType = typeof(DeclaringClass). GetEvent("EventName"). EventHandlerType. GetMethod("Invoke"). GetParameters(). ParameterType;