Professional Documents
Culture Documents
There are also a number of changes from the previous versions. VB7 now
supports inheritance and has a new error-handling mechanism. As part of the
.NET Framework, VB7 needs to update the data types for interoperability with
other programming languages such as C# and C++, and with the .NET
Framework and Runtime. Data types in VB7 now represent the .NET data types,
which are structures in the System namespace of the .NET Framework. However,
you can still use the old programming style when working with data types,
because in VB7 the data types are wrappers of those .NET data types. This
article shows you how you could adapt yourself to these data types.
Bad news for VB6 experts: their expertise is not really relevant in VB.NET.
Expertise in VB6 was often measured by skill in programming Windows API from
inside the language. This is no longer true with VB7; VB7 programmers are now
required to know the numerous types in the .NET Framework. To become an
expert in VB.NET, you have to start all over again.
First, of course, you need to master the many classes, interfaces and structures
that are part of the .NET Framework, not to mention the many changes in the
new version of the language. But you need to start somewhere, right?
Understanding the new set of data types is a good place to start.
VB7 value data types are wrappers for the corresponding .NET Framework type
structure. These structures derive from the class System.Object. In fact,
System.Object is the root of all types in the .NET Framework. The following table
lists the data types in VB7 and the corresponding .NET data types. Note that
there are new data types that were not available in VB6, and that some of the
data types in VB6 are no longer supported. The changes from VB6's integers,
currencies, and variants will be explained below.