如果有的话,您何时会期望标记为过时的类从 .NET 框架中删除?
当我们接近 .NET 框架的第四个主要版本时,我们可能会看到标记为过时(以表明它们已被弃用)的类和方法的数量增加。我发现此页面列出了所有过时成员和 类型,现在变得相当大。
所以,我想知道是否:
是否有任何标记为过时的成员或类型实际上已从框架的任何版本中删除?是否有来自 .NET 1 的元素根本不在更高版本中?
对于何时删除元素,Microsoft 是否遵循任何正式准则?这是在 X 次发布之后吗?经过时间?或者是否已弃用的元素可能会永久保留?
As we approach the 4th major release of the .NET framework we are likely to see an increase in the number of classes and methods marked as obsolete (to indicate they are deprecated). I found this page listing all the obsolete members and types, which is growing quite large now.
So, I was wondering whether:
Have any members or types marked as obsolete have been actually removed from any version of the framework? Are there elements from, say, .NET 1 that are not in later versions at all?
Are there any formal guidelines Microsoft follow as to when elements will be removed? Is this after X number of releases? Elapsed time? Or is it likely deprecated elements will remain in perpetuity?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从框架中删除过时的类的问题在于,它会成为针对框架构建的应用程序的重大更改,而应用
ObsoleteAttribute
则不然。因此,我预计在不久的将来(如果有的话)不会看到任何标记为过时的类被删除。
The problem with removing an obsolete class from the Framework is that it becomes a breaking change to applications built against the Framework, whereas applying
ObsoleteAttribute
is not.Consequently, I don't expect to see any of those classes marked obsolete removed any time in the near future, if ever.
最合理的方法是永远将它们留在那里,以保持向后兼容性。
The most reasonable way would be to leave them there forever in order to keep backward compatibility.