码迷,mamicode.com
首页 > 其他好文 > 详细

06-01 The Basic Mechanics of Inheritance

时间:2015-02-15 11:56:20      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:

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.

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

06-01 The Basic Mechanics of Inheritance

标签:

原文地址:http://www.cnblogs.com/cout/p/4292591.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!