Mega Code Archive

 
Categories / VB.Net / Reflection
 

Type GetType Method gets the Type with the specified name, performing a case-sensitive search

Imports System     Class MyClass1         Public Shared Sub Main()             Try                 Dim myType1 As Type = Type.GetType("System.Int32")                 Console.WriteLine("The full name is {0}.", myType1.FullName)                 Dim myType2 As Type = Type.GetType("NoneSuch", True)                 Console.WriteLine("The full name is {0}.", myType2.FullName)             Catch e As Exception                 Console.WriteLine(e.Message.ToString())             End Try         End Sub      End Class