什么是接口和抽象类的用途 [英] what is use of interface and abstract class
本文介绍了什么是接口和抽象类的用途的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是接口和抽象类的用法
what is use of interface and abstract class
推荐答案
请看我过去的答案:
对接口的怀疑 [ ^ ],
如何决定选择抽象类或接口 [ ^ ],
抽象类和接口,如果他们有相同的方法和变量 [ ^ ],
当我们使用抽象时以及何时使用接口...? [ ^ ],
接口和多态性 [< a href =http://www.codeproject.com/Answers/315106/Interfaces-and-Polymorphism#answer4target =_ blanktitle =New Window> ^ ],
没有过载和过度使用的多态性 [< a href =http://www.codeproject.com/Answers/695036/POLYMORPHISM-WITHOUT-OVERLOADING-AND-OVERRRIDING-I#answer1target =_ blanktitle =New Window> ^ ]。
只是注意:作为一个基类,一个类不必是抽象的。 Abstract仅用于禁用类的实例化;它不会影响任何功能。
-SA
Please see my past answers:
Doubts on Interfaces[^],
How to decide to choose Abstract class or an Interface[^],
Difference between abstract class and interface if they have same no of methods and var[^],
When we use abstract and when we use interface...?[^],
Interfaces and Polymorphism[^],
POLYMORPHISM WITHOUT OVERLOADING AND OVERRRIDING IS POSSIBLE[^].
Just a note: to serve as a base class, a class does not have to be abstract. Abstract is used just to disable instantiating of the class; it cannot affect any functionality.
—SA
什么是抽象类和接口的使用? [ ^ ]
更多资源来自 CP [ ^ ]和< a href =https://www.google.lk/?gws_rd=cr,ssl&ei=I-qTU6b_BIywuASsxoFY#q=use+of+interface+and+abstract+class+in+c%23> Google [ ^ ]
你可能还没看过<啊ref =http://www.codeproject.com/Articles/64628/Code-Project-Quick-Answers-> FAQ [ ^ ]这就是问这类问题的原因。
What is Use of Abstract class and Interface?[^]
And More resources from CP[^] and Google[^]
you may have not read the FAQ[^] that's why asking this type of questions.
引用:
4。发布的规则是什么?
发布问题时的一些简单规则。
1.您是否搜索 [ ^ ]或 Google搜索 [ ^ ]解决方案?
4. What are the rules to posting?
A few simple rules when posting your question.
1. Have you searched [^]or Googled[^] for a solution?
这篇关于什么是接口和抽象类的用途的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文