Export (0) Print
Expand All

Information.SystemTypeName Method

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

Namespace:  Microsoft.VisualBasic
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

public static string SystemTypeName(
	string VbName


Type: System.String

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

Return Value

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

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").

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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft