Name

CDec Function

Synopsis

CDec(expression)
expression required; Numeric or String

A numeric value or a string representation of a number

Named Arguments

No

Return Value

expression cast as a Decimal type

Description

Converts expression to a Decimal data type. If expression is not numeric or is outside the range of the Decimal data type, an exception is generated. Use the IsNumeric function to test whether expression evaluates to a number.

Get VB.NET Language Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.