VB.NET Language in a Nutshell

   
CStr Function

Named Arguments

No

Syntax

CStr( expression )

expression (required; any)

Any numeric, date, string, or Boolean expression

Return Value

expression converted to a string

Description

Returns a string representation of expression

Rules at a Glance

If expression is Boolean, the function returns one of the strings "True" or "False" . For an expression that can be interpreted as a date, the return value is a string representation of that date, in the short date format of the host computer. For a numeric expression, the return is a string representing the number.

Example

Dim sMyString as String sMyString = CStr(100)

Programming Tips and Gotchas

See Also

Str Function

   

Категории