Visual Basic 2005 with .NET 3.0 Programmer's Reference

The following table summarizes the Visual Basic data types.

Open table as spreadsheet

Type

Size

Values

Boolean

2 bytes

True or False

Byte

1 byte

0 to 255 (unsigned byte)

SByte

1 byte

-128 to 127 (signed byte)

Char

2 bytes

0 to 65,535 (unsigned character)

Short

2 bytes

-32,768 to 32,767

UShort

2 bytes

0 through 65,535 (unsigned short)

Integer

4 bytes

-2,147,483,648 to 2,147,483,647

UInteger

4 bytes

0 through 4,294,967,295 (unsigned integer)

Long

8 bytes

-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

ULong

8 bytes

0 through 18,446,744,073,709,551,615 (unsigned long)

Decimal

16 bytes

0 to +/-79,228,162,514,264,337,593,543,950,335 with no decimal point 0 to +/-7.9228162514264337593543950335 with 28 places

Single

4 bytes

-3.4028235E+38 to -1.401298E-45 (negative values) 1.401298E-45 to 3.4028235E+38 (positive values)

Double

8 bytes

-1.79769313486231570E+308 to -4.94065645841246544E-324 (negative values) 4.94065645841246544E-324 through 1.79769313486231570E+308 (positive values)

String

variable

Depending on the platform, approximately 0 to 2 billion Unicode characters

Date

8 bytes

January 1, 0001 0:0:00 to December 31, 9999 11:59:59 pm

Object

4 bytes

Points to any type of data.

Structure

variable

Structure members have their own ranges.

Категории