声明抽象方法你将使用什么接口或抽象类 [英] to declare abstract method what you will use interface or abstract class

查看:64
本文介绍了声明抽象方法你将使用什么接口或抽象类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

声明抽象方法你将使用什么接口或抽象类以及为什么

解决方案

当然你应该只抽象类..



请理解抽象类和界面之间的区别



都是c#类型..



使用抽象或接口取决于代码块的要求



通过这些链接可以清楚地了解







http://stackoverflow.com/questions/1231985/when-to-use-interfaces-or-abstract-classes-when-to-use-both





http://msdn.microsoft.com/en-us/library/scsyfw1d(v = vs.71)的.aspx

to declare abstract method what you will use interface or abstract class and why

解决方案

Offcourse you should Abstract Class only..

Please understand the difference between abstract class and interface

both are c# types..

Using Abstract or interface depends on the requirement of code block

Go through these links to have a clear idea on both



http://stackoverflow.com/questions/1231985/when-to-use-interfaces-or-abstract-classes-when-to-use-both


http://msdn.microsoft.com/en-us/library/scsyfw1d(v=vs.71).aspx


这篇关于声明抽象方法你将使用什么接口或抽象类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆