Page : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Data Types
The Data types available in VB .NET, their size, type, description are summarized in the table below.
Data Type are
Numeric Data
Integer and Long are the most commonly used data types. The conventional Integer found in C, C++ and java is a 16-bit data type but the Integer in VB.Net is now 32 bit, while Long is now 64 bit.
Decimal Data
VB.Net has a 128-bit Decimal data type, which provides support for very large values that can be scaled by powers of 10.
It is divided into 2 parts
96-bit integer for storing the Integer part
32-bit integer for storing the decimal part
Decimal can have values anywhere between 0 to 28 digits to the right of the decimal point. More the digits to the right, higher is the precision we get.
Character Data
Char contains Unicode value ranging from 0-65535 and consumes 2 bytes of space. It directly supports international character sets. The Char data type is intended for use in manipulating single character values or for creating arrays of character values.
Strings
String data type comes form the System.String Class. Any attempt to change the value of the String. Results in a new String being created to store the changed value, while the original is destroyed.
Objects
VB.NET has the Object Data type. The Object data type can hold any type of data. It automatically adjusts its internal data type to accommodate the value so that it coule be stored.