Chapter 10. Classes and Objects: A Deeper Look

 

But what, to serve our private ends, Forbids the cheating of our friends?

 
 --Charles Churchill
 

This above all: to thine own self be true.

 
 --William Shakespeare.
<feature> <supertitle>Objectives</supertitle>

In this chapter you’ll learn:

<objective>

Encapsulation and data hiding.

</objective>
<objective>

To use keyword this.

</objective>
<objective>

To use static variables and methods.

</objective>
<objective>

To use readonly fields.

</objective>
<objective>

To take advantage of C#’s memory-management features.

</objective>
<objective>

To use the IDEs Class View and Object Browser windows.

</objective>
<objective>

To use object initializers to create an object and initialize it in the same statement.

</objective> ...

Get Visual C# 2010: How to Program, Fourth Edition now with O’Reilly online learning.

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