
Get the DeclarationHeader of all Events of a Class at Runtime.
Try this:
Dim t As Type
Dim eo As System.Reflection.EventInfo
Dim m As System.Reflection.MethodInfo
Dim p As System.Reflection.ParameterInfo
Dim ParName As String
Dim ParType As String
Dim myAssemblies As [Assembly]() = Thread.GetDomain().GetAssemblies()
' Get the dynamic assembly named 'MyAssembly'.
Dim myAssembly As [Assembly] = Nothing
Dim i As Integer
For i = 0 To myAssemblies.Length - 1
If [String].Compare(myAssemblies(i).GetName().Name,
Application.ProductName.ToString()) = 0 Then
myAssembly = myAssemblies(i)
Console.WriteLine(myAssembly)
For Each t In myAssembly.GetTypes()
For Each eo In t.GetEvents()
m = eo.EventHandlerType.GetMethod("Invoke")
Console.WriteLine(m.Name.ToString)
For Each p In m.GetParameters()
ParName = p.Name
ParType = p.ParameterType.Name
Console.WriteLine(ParName.ToString())
Console.WriteLine(ParType.ToString())
Next
Next
Next
Exit For
End If
Next