Mega Code Archive

 
Categories / VB.Net / Reflection
 

Type Class Represents type declarations

Imports System Imports System.Reflection Module Example     Sub Main()          Dim t As Type = GetType(String)         Dim substr As MethodInfo = t.GetMethod("Substring",New Type() { GetType(Integer), GetType(Integer) })         Dim result As Object = substr.Invoke("Hello, World!", New Object() { 7, 5 })         Console.WriteLine("{0} returned ""{1}"".", substr, result)     End Sub  End Module