O'Reilly logo

Microsoft® Visual Basic® 2010 Developer’s Handbook by Klaus Löffelmann and Sarika Calla Purohit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

.NET Equivalents of Base Data Types

There is a .NET equivalent for each base data type in Visual Basic, as shown in Table 6-6.

Table 6-6. The Base Visual Basic Data Types and Their .NET Equivalents

Base data type in Visual Basic

.NET data type equivalent

Byte

System.Byte

SByte

System.SByte

Short

System.Int16

UShort

System.UInt16

Integer

System.Int32

UInteger

System.UInt32

Long

System.Int64

ULong

System.UInt64

Single

System.Single

Double

System.Double

Decimal

System.Decimal

Boolean

System.Boolean

Date

System.DateTime

Char

System.Char

String

System.String

Table 6-6 illustrates that it doesn’t matter at all whether you declare a 32-bit integer with

Dim loc32BitInteger as Integer

or with

Dim loc32BitInteger as System.Int32

The object variable loc32BitInteger ends up with the exact same ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required