Dynamically Calling Methods
page 4 of 7
by . .
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 29462/ 61

MethodInfo

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.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-25 5:45:45 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search