Section 9.1. Introduction


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 compositiona 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 "memory leaks." In addition, we discuss Shared class variables that are shared among all objects of a class. We then present the differences between constant members created with Const and ReadOnly. Finally, we show how to use the Object Browser to discover the capabilities of the classes in the Framework Class Library (FCL). Chapters 10 and 11 introduce inheritance and polymorphism, respectivelytwo key OOP technologies.



Visual BasicR 2005 for Programmers. DeitelR Developer Series
Visual Basic 2005 for Programmers (2nd Edition)
ISBN: 013225140X
EAN: 2147483647
Year: 2004
Pages: 435

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net