Looking for method name by address in vb.net

122 views Asked by At

This is not really a question because I found out how to do this. Start with a delegate.

Public Delegate Sub PageFunction()

Then, define a function, for example:

Sub Action()
End Sub

Then you can get the function name from its address, like:

    Dim x As PageFunction = AddressOf Action

    Response.Write( x.Method.Name )
0

There are 0 answers