Visual Basic .NET Data Types

Visual Basic .NET (VB .NET) lets you get right to the basics without having to wade through translators. The following table shows you the data types VB .NET uses, as well as their CLR structure, storage size, and value ranges. Use the info for good, not evil!























































































Visual Basic TypeCommon Language Runtime Type StructureStorage SizeValue Range
BooleanSystem.Boolean2 bytesTrue or False
ByteSystem.Byte1 byte0 to 255 (unsigned)
CharSystem.Char2 bytes0 to 65535 (unsigned)
DateSystem.DateTime8 bytesJanuary 1, 0001 to December 31, 9999
DecimalSystem.Decimal16 bytes+/-79,228,162,514,264,337,593,543,950,335 with no decimal
point; +/-7.9228162514264337593543950335 with 28 places to the
right of the decimal; smallest non-zero number is
+/-0.0000000000000000000000000001
Double (double- precision floating-point)System.Double8 bytes-1.79769313486231E+308 to 4.94065645841247E-324 for negative
values; 4.94065645841247E-324 to 1.79769313486231E+308 for positive
values
IntegerSystem.Int324 bytes-2,147,483,648 to 2,147,483,647
Long (long integer)System.Int648 bytes-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
ObjectSystem.Object (class)4 bytesAny type can be stored in a variable of type Object
ShortSystem.Int162 bytes-32,768 to 32,767
Single (single-precision floating-point)System.Single4 bytes-3.402823E+38 to -1.401298E-45 for negative values;
1.401298E-45 to 3.402823E+38 for positive values
String (variable-length)System.String (class)Depends on implementing platform0 to approximately 2 billion Unicode characters
User-Defined Type (structure)(inherits from System.ValueType)Sum of the sizes of its membersEach member of the structure has a range determined by its data
type and independent of the ranges of the other members








dummies

Source:http://www.dummies.com/how-to/content/visual-basic-net-data-types.html

No comments:

Post a Comment