This documentation is archived and is not being maintained.

SystemTypeName Function

Returns a String value containing the system data type name of a variable.

Public Function SystemTypeName(ByVal VbName As String) As String

Parameter

VbName
Required. A String variable containing a Visual Basic .NET type name.

Remarks

SystemTypeName returns the fully qualified common language runtime 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

This 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 MySysName As String
MySysName = SystemTypeName(VbLongName)   ' Returns "System.Int64".
MySysName = SystemTypeName(VbDateName)   ' Returns "System.DateTime".
MySysName = SystemTypeName(VbBadName)   ' Returns Nothing.

Requirements

Namespace: Microsoft.VisualBasic

Module: Information

Assembly: Microsoft Visual Basic .NET Runtime (in Microsoft.VisualBasic.dll)

See Also

Data Type Summary | String Data Type | VbTypeName Function

Show: