
Object Orientation in the .NET Platform | 11
Introduction
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Object Orientation in the .NET Platform
The .NET Framework was built to be object oriented from the ground up. What
does this mean? For those of you who are unfamiliar with object-oriented
programming, here’s a quick review.
We’ve already discussed classes. Classes are the blueprints or templates from
which objects are created. Objects, the heart of object-oriented programming, are
usable instances of a class. Objects expose properties, which contain data related
to or about the object, and/or methods, which allow actions to be performed on
the object.
In object-oriented programming, objects need to support three important quali-
ties: encapsulation, inheritance, and polymorphism.
Encapsulation refers to the ability of an object to hide its internal data from
outside view and allow access to only that data through publicly available
methods. This helps prevent clients from accidentally or purposefully leaving
object data in a corrupt state and makes it easier for the developer of the class on
which the object is based to change the internal implementation of these data
members without breaking its clients.
Inheritance refers to the ability to derive one class from another. This allows devel-
opers to create a new class based on