.NET Framework Primitive Value Types

The .NET Framework Base Class Library provides lots of built-in value types that you can use according to your needs. Each value type is a structure exposed by the Base Class Library.

Visual Basic 2010 provides reserved words that are counterparts of the most common value type names. For example, the System.Int32 value type has an alias in the Integer reserved word. The following two lines of code are perfectly equivalent:

Dim anInteger As System.Int32 = 0 Dim anInteger As Integer = 0

You may use indistinctly both .NET names and the Visual Basic reserved words when referring to built-in value types.

Naming Conventions

Although you are allowed to invoke value types with both .NET names and the Visual Basic ...

Get Visual Basic 2010 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.