Data Types in VB.NET

How to use Data Types?

Explanation

Visual Basic.net 2008 Datatypes

Data Type in Visual Basic.net 2008 defines the type of data a programming element should be assigned, how it should be stored and the number of bytes occupied by it.
In VB.net 2008 all the variables by default are of Variant datatype was used for numeric, date, time and string data, but in VB.net 2008 Variant and Currency datatypes are no longer available. Following are the common data types used in Visual Basic.Net 2008.
Data Type Value Range
Byte 0 to 255
Boolean True or False
Char 0 to 65535
Date January 1, 0001 to December 31,9999
Decimal +/-79,228,162,514,264,337,593,543,950,335 with no decimal point; +/-7.9228162514264337593543950335 with 28 place to right of decimal.
Double -1.79769313486231E+308 to -4.94065645841247E-324 for negative values to 4.94065645842247E-324 to 1.79769313486231E+308 for positive values.
Integer -2,147,483,648 to 2,147,483,647
Long -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
Object Any type can be stored in a variable of type Object
Short -32,768 to 32,767
Single -3.402823 * 103 to -1.401298 * 10 45 for negative values 1.401298 * 10 -45 to 3.402823 * 10 38for positive values
String 0 to approximately 2 billion characters

Visual Basic Tutorial


Ask Questions

Ask Question