SystemTypeName Function
Returns a String value that contains the system data type name of a variable.
Public Function SystemTypeName(ByVal VbName As String) As String
Parameters
- VbName
Required. A String variable containing a Visual Basic type name.
Remarks
SystemTypeName returns the fully qualified common language runtime (CLR) type name corresponding to the Visual Basic type name. For example, if VbName contains "Date", SystemTypeName returns "System.DateTime". If SystemTypeName does not recognize the value of VbName, it returns Nothing (not the string "Nothing").
Example
The following example uses the SystemTypeName function to return data type names for several variables.
Dim vbLongName As String = "Long"
Dim vbDateName As String = "Date"
Dim vbBadName As String = "Number"
Dim testSysName As String
testSysName = SystemTypeName(vbLongName)
' The preceding call returns "System.Int64".
testSysName = SystemTypeName(vbDateName)
' The preceding call returns "System.DateTime".
testSysName = SystemTypeName(vbBadName)
' The preceding call returns Nothing.
Requirements
Namespace: Microsoft.VisualBasic
Module: Information
Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)
See Also
Reference
Data Type Summary (Visual Basic)