Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))

SystemTypeName Function

Class

Microsoft.VisualBasic.Information

Syntax

SystemTypeName(vbName)

vbName (required; String)

The name of a Visual Basic data type

Description

The SystemTypeName function returns the fully qualified type name of the Common Type System (CTS) data type that corresponds to a particular Visual Basic data type. For instance, passing the name "Date" to this function returns "System.DateTime."

Usage at a Glance

  • If vbName is not a valid Visual Basic data type, the function returns Nothing.

  • To determine the CTS data type of a particular variable, pass the variable as an argument to the TypeName function and then pass that function's return value as an argument to the SystemTypeName function. For example:

    trueType = SystemTypeName(TypeName(someVariable))

Version Differences

The SystemTypeName function is new to VB under .NET.

See Also

TypeName Function, VbTypeName Function

Категории