C# - Abstract Classes

2020-12-13 14:12

阅读:204

标签:c#   abstract classes   


Abstract classes are closely related to interfaces. They are classes that cannot be instantiated, and are frequently either partially implemented, or not at all implemented. One key difference between abstract classes and interfaces is that a class may implement an unlimited number of interfaces, but may inherit from only one abstract (or any other kind of) class. A class that is derived from an abstract class may still implement interfaces. Abstract classes are useful when creating components because they allow you specify an invariant level of functionality in some methods, but leave the implementation of other methods until a specific implementation of that class is needed. They also version well, because if additional functionality is needed in derived classes, it can be added to the base class without breaking code.

C# - Abstract Classes

标签:c#   abstract classes   

原文地址:http://blog.csdn.net/troubleshooter/article/details/40586181

上一篇:Java基础---Java 类

下一篇:直接插入排序


评论


亲,登录后才可以留言!