WHAT YOU WILL LEARN IN THIS CHAPTER
Object Oriented Terminology
Composition of an Object
Characteristics of Value Types versus Reference Types
Commands: If Then, Else, Select Case
Common Value Types (Structures)
Common Reference Types (Classes)
Parameter passing ByVal and ByRef
Working with Objects
Data type conversions
Advanced Object Oriented Programming
Visual Basic supports the four major defining concepts required for a language to be fully object-oriented:
Abstraction — Abstraction is merely the ability of a language to create "black box" code, to take a concept and create an abstract representation of that concept within a program. A
Customer object, for instance, is an abstract representation of a real-world customer. A
DataTable object is an abstract representation of a set of data.
Encapsulation — Encapsulation is the concept of a separation between interface and implementation. The idea is that you can create an interface (public methods, properties, fields, and events in a class), and, as long as that interface remains consistent, the application can interact with your objects. This remains true even when you entirely rewrite the code within a given method — thus, the interface is independent of the implementation. The publicly exposed interface becomes what is known as a contract. It is this contract that you will look to limit changes to for ...