Understanding Classes

Having used controls and forms in Visual Basic .NET applications, you have already used classes and objects. For example, when you draw a text box on a form, you are actually creating a specific instance of the TextBox class. For example, if you draw five text boxes on your form, you have created five instances of the TextBox class. Even though each instance is a distinct entity, they were all created from the same template. A form itself is an instance of the Form class.

Instances of a class are known as objects. Each different class is a template from which a specific type of object is created. In this example, the TextBox class defines that a text box has a Text property. However, the class definition itself does not ...

Get Special Edition Using Microsoft® Visual Basic® .NET now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.