6. Inheritance

THE PRECEDING CHAPTER DISCUSSED how one class can reference other classes via fields and properties. This chapter discusses how to use the inheritance relationship between classes to build class hierarchies.

image

Beginner Topic: Inheritance Definitions

The preceding chapter provided an overview of inheritance. Here’s a review of the defined terms.

Derive/inherit: Specialize a base class to include additional members or customization of the base class members.

Derived/sub/child type: The specialized type that inherits the members of the more general type.

Base/super/parent type: The general type whose members a derived type inherits. ...

Get Essential C# 4.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.