GetType Method : GetType « Reflection « VB.Net Tutorial






Option Strict On

Public Module GetTypeMethod
   Public Sub Main
      Dim firstName As String = "John"
      Dim firstNameType As Type = firstName.GetType()
      
      Console.WriteLine("The type of the variable firstname is {0}.", _
                        firstNameType)
   End Sub
End Module
The type of the variable firstname is System.String.








19.1.GetType
19.1.1.Get variable type
19.1.2.GetType Method
19.1.3.A nested class and a struct in MyClass, and then obtains objects of the nested types