SystemTypeName Method

Information.SystemTypeName Method (String)

 

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
)

Parameters

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
Available since 1.1
Return to top
Show:
© 2016 Microsoft