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 requiring parentheses, and ByVal being the default method for passing parameters. 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 ...

Get A Programmer's Introduction to Visual Basic® .NET 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.