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

CChar Function

Syntax

Dim result As Char = CChar(expression)

expression (required; String)

Any string expression

Description

The CChar function converts the first character of a string to the Char data type.

Usage at a Glance

  • Use the ChrW function to convert a numeric code to its corresponding Char data type.

  • This function does not support named arguments.

Example

MsgBox(CChar("abc")) ' Displays "a" MsgBox(CChar("56")) ' Displays "5"

See Also

Chr, ChrW Functions

Категории