Changes to Data Types

Several changes to data types and user-defined types have evolved in Visual Basic .NET. Those changes are described in this section.

Currency Data Type

The Currency type has been replaced by the Decimal type. Changes to value types are described in the section on “Data Types” in Chapter 2, “Out with the Old, In with the New.”

DefType Is Not Supported

Visual Basic 6 allowed you to add a DefType statement at the module level. For example, DefBool B indicates that all variables that are introduced without a variable type and begin with the letter B default to a Boolean data type.

VB6 supported DefBool, DefByte, DefCur, DefDate, DefDbl, DefDec, DefInt, DefLng, DefObj, DefSng, DefStr, and DefVar, followed by a range of letters; ...

Get Visual Basic® .NET 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.