06-01 The Basic Mechanics of Inheritance

The existing class that will serve as the basis for the new class is termed a base or parent class.

那些用于服务新的的已经存在的类被称为基类或者父类。

The extending classes are formally termed derived or child classes.

扩展类被称为继承类或者子类。

Although constructors are typically defined as public, a derived class never inherits the constructors of a parent class. 

虽然构造函数被定义魏公共的,继承类从来不继承父类的构造函数。

Remember, private members can only be accessed by the class that defines it. 

Speaking of base classes, it is important to keep in mind that C# demands that a given class have exactly one direct base class. It is not possible to create a class type that directly derives from two or more base classes 

C# supplies another keyword, sealed, that prevents inheritance from occurring.

C#提供了另一个关键字,sealed防止继承的发生。

 Therefore, you can never derive one structure from another structure, a class from a structure, or a structure from a class.

---------------------------------------------------------------------------------------------------------------------------------------

posted @ 2015-02-15 10:47  海川0  阅读(114)  评论(0编辑  收藏  举报