Chapter 3 Major VB.NET Changes(1)

Major VB.NET Changes
VB.NET introduces major changes to the VB language. Some
are modifications to existing ways of working, whereas others
are brand new. This chapter will cover some of those
changes, but this is by no means an exhaustive list of all
changes from VB to VB.NET. First, you’ll see some of the
features that have changed. Then you will see some of the
new features.
General Changes
There are a number of general changes to be aware of when
moving from VB to VB.NET. Among them are topics such as
the removal of default properties, subs and functions requir-ing
parentheses, ByVal being the default method for passing
parameters, and changes to the logical operators. These
changes, and others, are detailed in this section.
Default Properties
In VB6, objects could have default properties. For example,
the following code is perfectly valid in VB6, if you assume
that Text1 is a text box:
Text1=”Hello,World ”
This code takes the string “Hello,World ”and sets the
default property of the text box, the Text property, to the
string. The major drawback to default properties is that they
require you to have a Set command in VB. For example, take
a look at the following block of VB6 code:
CHAPTER 3
Major VB.N