Head First C# Code: Chapter 6, Inheritance

Chapter 6 Opening Image

Sometimes you DO want to be just like your parents.

Head First C#

Ever run across an object that almost does exactly what you want your object to do? Found yourself wishing that if you could just change a few things, that object would be perfect? Well that's just one reason that inheritance is one of the most powerful concepts and techniques in the C# language. Before you're through this chapter, you'll learn how to subclass an object to get its behavior, but keep the flexibility to make changes to that behavior. You'll avoid duplicate code, model the real world more closely, and end up with code that's easier to maintain.

Download the Code