Edit

Share via


Information.SystemTypeName(String) Method

Definition

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

public:
 static System::String ^ SystemTypeName(System::String ^ VbName);
public static string? SystemTypeName (string? VbName);
public static string SystemTypeName (string VbName);
static member SystemTypeName : string -> string
Public Function SystemTypeName (VbName As String) As String

Parameters

VbName
String

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

Returns

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

Examples

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.

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

Applies to

See also