9.1. Introduction

In the preceding chapters, we introduced the basic concepts and terminology of object-oriented programming (OOP) in Visual Basic. This chapter takes a deeper look at classes. We introduce class scope and discuss how it affects where class members can be accessed. We demonstrate that constructors can be overloaded to allow clients to initialize objects of a class in several ways. We discuss how partial classes enable one class to span multiple source-code files. We explain composition—a capability that allows a class to have references to objects of other classes as members. We show how to use the Me reference to refer to the current object’s members. The chapter presents garbage collection and discusses how it eliminates most ...

Get Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition 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.