ClassMicrosoft.VisualBasic.Information SyntaxDim result As String = TypeName(varName)
DescriptionThe TypeName function returns the name of the data type for varName. The possible return values are:
Anything else The name of the class or structure used to create an instance of varName Usage at a Glance
ExampleDim genericObject As Object genericObject = New Employee MsgBox(TypeName(genericObject)) ' Displays: Employee genericObject = 100 MsgBox(TypeName(genericObject)) ' Displays: Integer genericObject = Nothing MsgBox(TypeName(genericObject)) ' Displays: Nothing Version Differences
See AlsoVarType Function |