.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 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.