O'Reilly logo

Visual Basic 2010 Unleashed by Alessandro Del Sole

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

Constructors

A constructor is a method you invoke to create a new instance of a class that is represented by the New keyword in Visual Basic. For example, if you have the following Contact class

image

you can then create a new instance of the Contact class as follows:

image

All the three preceding syntaxes are enabled, so you can use the one you prefer. (I use the second one for better readability.) In other words, creating an instance means giving life to a new copy of the object so that you can use it for your purposes, such as storing data or performing ...

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