Section A.6. Conversion


A.6. Conversion

A.6.1. Data Type Conversion

Element

Description

CBool Function

Converts an expression to a Boolean data type.

CByte Function

Converts an expression to a Byte data type.

CChar Function

Converts a string expression to a Char data type.

CDate Function

Converts an expression to a Date data type.

CDbl Function

Converts an expression to a Double data type.

CDec Function

Converts an expression to a Decimal data type.

CInt Function

Converts an expression to an Integer data type.

CLng Function

Converts an expression to a Long data type.

CObj Function

Converts an expression to an Object data type.

CSByte Function

New in 2005. Converts an expression to an SByte data type.

CShort Function

Converts an expression to a Short data type.

CSng Function

Converts an expression to a Single data type.

CStr Function

Converts an expression to a String data type.

CType Function

Converts an expression to any valid data type, structure, object type, or interface.

CUInt Function

New in 2005. Converts an expression to a UInteger data type.

CULng Function

New in 2005. Converts an expression to a ULong data type.

CUShort Function

New in 2005. Converts an expression to a UShort data type.

DateValue Function

Converts the string representation of a date to a Date data type.

DirectCast Function

Converts a variable to its runtime type.

GetType Operator

Returns the type of a given object.

Option Strict Statement

Determines whether narrowing operations are allowed.

Str Function

Converts a numeric value to a string.

TimeValue Function

Converts a string representation of time to a Date data type.

TryCast Function

New in 2005. Converts a variable to a specified type, if possible.

Val Function

Converts a numeric string to a number .


A.6.2. Other Conversion

Element

Description

ErrorToString Function

Returns the descriptive error message corresponding to a particular error code

Fix Function

Returns the integer portion of a number

Hex Function

Converts a number to a string representing its hexadecimal equivalent

Int Function

Returns the integer portion of a number

Oct Function

Converts a number to a string representing its octal equivalent

QBColor Function

Converts a QBasic color code to an RGB color value

RGB Function

Returns a system color code that can be assigned to object color properties





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