ASP.NET System.Web.Abstractions 为什么将它们创建为抽象基类?
如上所述,我真的想知道为什么微软将抽象发布为抽象类而不是接口?
我会对任何见解感兴趣,因为我需要对标准事物(例如文件和目录的 System.IO 功能)做类似的事情,但是我觉得界面会感觉更好吗?
选择抽象肯定有充分的理由,除了它更适合其程序集命名空间 System.Web.ABSTRACTions 之外。
谢谢
As above really, I'm wondering why Microsoft released the abstractions as abstract classes instead of interfaces?
I would be interested in any insights because I need to do something similar for standard things like System.IO features for File and Directory, however I feel that an interface would feel nicer?
There must be a good reason why an abstract was chosen instead, other than the fact it fits into their assembly namespace better, System.Web.ABSTRACTions.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信 Phil(Haack,来自 ASP.NET MVC 团队)在他的博客上解释了这个决定。 查看这篇文章:
抽象基类和接口的版本控制问题
I believe Phil (Haack, from the ASP.NET MVC team) explained this decision on his blog. Check out this post:
Versioning Issues With Abstract Base Classes and Interfaces