Types

Two kinds of types are supported in VB.NET, value types and reference types. The difference between these two kinds of types is in the way the variables of each type behave.

Value Types

Unlike reference types, variables of value types contain the actual data they represent. Value types consist of primitives (except Object and String), enumerations, and structures.

Primitive Types

Primitive types are shorthand for CLR types found in the .NET platform. Table C.3 outlines each of the value types found in VB.NET as well as the system-provided type to which it corresponds.

Table C.3. Primitive Value Types in VB.NET
Type Name Category Description
Short System.Int16 16-bit signed integral type
Integer System.Int32 32-bit signed integral type

Get ASP.NET by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.