VB .NET data types

VB .NET data types

There is no Variant data type in VB .NET. There are some other changes to

the traditional VB data types. A new Char type, which is an unsigned 16-bit

type, is used to store Unicode characters. The Decimal type is a 96-bit signed

integer scaled by a variable power of 10.

Here are all the VB .NET data types:

Boolean System.Boolean 4 bytes True or False

Char System.Char 2 bytes 0–65535 (unsigned)

Byte System.Byte 1 byte 0–255 (unsigned)

Object System.Object 4 bytes Any Type

Date System.DateTime 8 bytes 01-Jan-0001 to

31-Dec-9999

Double System.Double 8 bytes +/–1.797E308

Decimal System.Decimal 12 bytes 28 digits

Integer System.Int16 2 bytes –32,768 to 32,767

System.Int32 4 bytes +/–2.147E9

Long System.Int64 8 bytes +/–9.223E18

Single System.Single 4 bytes +/–3.402E38

String System.String CharacterCount 2 billion

* 2 (plus 10 bytes) characters

Data Type

Size in Bytes

Description

Type

Byte

1

8-bit unsigned integer

System.Byte

Char

2

16-bit Unicode characters

System.Char

Integer

4

32-bit signed integer

System.Int32

Double

8

64-bit floating point variable

System.Double

Long

8

64-bit signed integer

System.Int64

Short

2

16-bit signed integer

System.Int16

Single

4

32-bit floating point variable

System.Single

String

Varies

Non-Numeric Type

System.String

Date

8

System.Date

Boolean

2

Non-Numeric Type

System.Boolean

Object

4

Non-Numeric Type

System.Object

Decimal

16

128-bit floating point variable

System.Decimal



No comments: