Chapter 4: Inheritance


Overview

Chapter 3, "Objects and Types," examined how to use individual classes in C#. The focus in that chapter was on how to define methods, constructors, properties, and other members of a single class (or a single struct). Although you did learn that all classes ultimately derive from the class System.Object, you did not see how to create a hierarchy of inherited classes. Inheritance is the subject of this chapter. It briefly discusses the scope of C#'s support for inheritance before examining in detail how to code first implementation inheritance and then interface inheritance in C#. Note that this chapter presumes familiarity with the basic concepts of inheritance, including virtual functions and overriding. This chapter concentrates on the syntax used to provide inheritance and inheritance-related topics, such as virtual functions, and on those aspects of the C# inheritance model that are particular to C# and not necessarily shared by other object-oriented languages.




Professional C# 2005
Pro Visual C++ 2005 for C# Developers
ISBN: 1590596080
EAN: 2147483647
Year: 2005
Pages: 351
Authors: Dean C. Wills

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net