CChar Function


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




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net