Making the Most of Objects and Classes

This section describes three very important features of objects and classes: inheritance, overloading, and events. These concepts are a little more advanced than properties and methods but the payback from understanding them can be huge. If you need some coffee and a snack, now is the time to fetch them.

Inheritance (and Not from Uncle Otto)

If you’re a sharp-eyed reader, you’ve noticed that the code for each form in the examples began with the same statement. Visual Basic .NET creates this statement automatically and the text didn’t mention it. As a result, don’t feel bad if you concerned yourself with more important matters. Here it is:

Public Class Form1
    Inherits System.Windows.Forms.Form

Note

An object is ...

Get Faster Smarter Beginning Programming 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.