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.