Numeric Data Types

The Visual Basic language defines the numeric types as described in Table 6.1.

Table 6.1. Numeric Data Types in Visual Basic .NET
Name Size Value Range and Description
Byte 1 byte 0 to 255. An unsigned byte.
Short 2 bytes –32,768 to 32,767. Integer value.
Integer 4 bytes –2,147,483,648 to 2,147,483,647. Integer value.
Long 8 bytes –9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. Integer value.
Decimal 12 bytes +/–79,228,162,514,264,337,593, 543,950,335 with no decimal point; +/–7.9228162514264337593543950335 with 28 places to the right of the decimal; smallest non-zero number is +/–0.0000000 000000000000000000001.
Single 4 bytes 3.402823E38 to –1.401298E-45 for negative values; 1.401298E-45 to 3.402823E38 for positive ...

Get Visual Basic® .NET by Example 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.