Inheritance and Polymorphism


Jump to: navigation, search
Visual C# Tutorials
C# Tutorials

Inheritance and Polymorphism

© 2006 O'Reilly Media, Inc.
This tutorial—Inheritance and Polymorphism—is from Learning C# 2005, 2nd ed., by Jesse Liberty, Brian MacDonald. Copyright © 2006 O'Reilly Media. All rights reserved. This article is reproduced by permission. This tutorial has been edited especially for C# Online.NET.  Read the book review! LearningCSharpOreilly.jpg


Inheritance and Polymorphism

In Chapter 7, you learned how to create new types by declaring classes, and in Chapter 6, you saw a discussion of the principle object relationships of association, aggregation, and specialization. This chapter focuses on specialization, which is implemented in C# through inheritance. This chapter also explains how instances of more specialized classes can be treated as if they were instances of more general classes, a process known as polymorphism. This chapter ends with a consideration of sealed classes, which cannot be specialized, and a discussion of the root of all classes, the Object class.


Previous_Page_.gif Next_Page_.gif

Share this page
  • del.icio.us
  • Facebook
  • Google+
  • StumbleUpon