Visual Basic has a large variety of data types, i.e., kinds of things that variables can be. Some of the data types supported in Visual Basic are:
Type | Storage Size | Range |
Integer | -32,768 to 32,767 | |
Long | -2,147,483,648 to 2,147,483,647 | |
Single | 1.401298e-45 to 3.402823e38 (positive values) -3.402823e38 to -1.40298e-45 (negative values) | |
Double | 4.94065645841247e-324 to 1.79769313486231e308 (positive values) -1.79769313486231e308 to -4.94065645841247e-324 (negative values) | |
Currency | -922,337,203,685,477.4808 to 922,337,203,685,477.4808 | |
String | 0 to 2e32 characters | |
Byte | 0 to 255 | |
Boolean | True or False | |
Date | January 1, 100 to December 31, 9999 |
An example using some of the above data types: