9. Object-Oriented Programming: Classes and Objects

Nothing can have value without being an object of utility.

—Karl Marx

Your public servants serve you right.

—Adlai E. Stevenson


In this chapter you’ll:

• Declare a class and use it to create an object.

• Implement a class’s behaviors as methods.

• Implement a class’s attributes as instance variables and properties.

• Use a constructor to ensure that an object’s attributes are initialized.

• Use properties to ensure that only valid data is placed in attributes.

• Construct new classes that reuse existing classes via composition.

• Implement classwide information with Shared class variables.

• Use the Object Browser to discover the capabilities of the classes in the .NET Framework ...

Get Visual Basic® 2012 How to Program, Sixth Edition now with O’Reilly online learning.

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