CSByte Function


CSByte Function

Syntax

     Dim result As SByte = CSByte(expression) 


expression (required; String or Numeric)

Any expression in the valid range of the SByte data type

Description

New in 2005. The CSByte function converts expression to the SByte data type.

Usage at a Glance

  • An expression that evaluates outside the valid range of the target data type results in a runtime error. Nonnumeric expressions also generate an error.

  • Use IsNumeric to test whether expression evaluates to a number.

  • This function does not support named arguments.

Example

     Dim targetNumber As SByte     If IsNumeric(stringNumber) Then        targetNumber = CSByte(stringNumber)     End If 

Version Differences

The CSByte function is new in the 2005 version of VB.

See Also

CByte Function




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