.net 框架过时的方法 - 它们什么时候会被删除?
我的任务是将应用程序从 .net 1.1 重新编译到 .net 4.0。
我被告知不要进行任何代码更改 - 然而,随着框架版本的所有更改 - 我不愿意保留标记为“过时”的方法。
微软的网站指出,保留过时的方法是为了向后兼容以前的框架版本,但也作为警告,将来它们将被删除 - 我的问题“它们什么时候会被删除?”
I have been tasked with recompiling an application from .net 1.1 to .net 4.0.
I have been told to not make any code changes - however with all the changes through the versions of the framework - I am reluctant to leave in methods that are marked as Obsolete.
Microsoft's website states that obsolete methods are left in for backwards compatability with the previous framework version but also as a warning that in the future they will be removed - my question "When will they be removed?"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于何时删除特定的
Obsolete
方法,没有设定的时间范围。一般来说,删除方法的过程如下:考虑到 .Net 4.0 只有 4 个主要版本,这实际上是第一个可以通过此过程删除方法的版本 我不知道有多少或任何方法实际上已从 BCL 中删除,但我怀疑这个数字很小。
There is no set time frame for when a particular
Obsolete
method will be removed. Generally the process of removing a method goes as followsDeprecated
in a major releaseObsolete
in a future major releaseGiven that there are only 4 major release of .Net 4.0 is really the first version where a method could be removed by this process. I don't know off hand how many, or any, methods have actually been removed from the BCL but I suspect the number is small.
这取决于微软,但我猜永远不会,除非它们坏了。
MS 高度重视向后兼容性。
That's up to MS, but my guess is never unless they are broken.
MS places a high priority on backwards compatibility.
我不认为这是已知的或提前发布的,这只是一个警告,它们可能会在未来的版本中消失。
I don't think this is known or published in advance, it's just a heads up that they might disappear in a future release.