MethodInfo is a class that stores method information and the GetMethod function of System.Type returns a fully loaded MethodInfo class for you to use.
Public Class WebForm3 Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim mtype As Type = GetType(WebForm3) Dim minfo As System.Reflection.MethodInfo = mtype.GetMethod("Return1") End Sub
Public Function Return1(ByVal name As String) As String Return "Hello " & name End Function
End Class |
This piece of code fills minfo with lots of information about the function Return1.