.NET框架已过时的方法 - 当他们会被删除?框架、方法、NET

2023-09-06 14:05:58 作者:挂在树上的骷髅。

我一直在负责重新编译应用程序从.NET 1.1到.NET 4.0。

I have been tasked with recompiling an application from .net 1.1 to .net 4.0.

我已被告知不作任何code的变化 - 通过框架的版本,所有的变化不过 - 我不愿意在被标记为已过时的方法离开

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.

微软的网站上指出,过时的方式留在向后兼容性与previous framework版本,也可作为警告,在未来,他们将被删除 - 什么时候他们将被删除我的问题。

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?"

推荐答案

有当一个特定的过时方法来去除没有固定的时间框架。通常除去的方法的流程如下

There is no set time frame for when a particular Obsolete method will be removed. Generally the process of removing a method goes as follows

标记的方法,德$ P $一个主要版本pcated 标记的方法,过时在将来的主要版本 删除在将来的主要版本的方法 Mark the method as Deprecated in a major release Mark the method as Obsolete in a future major release Remove the method in a future major release

由于只有4个主要的.Net 4.0的发布是真的,其中一个方法,可以通过这个过程要删除的第一个版本。我不知道了手多少,或者,方法实际上已经从BCL删除,但我怀疑数量较少。

Given 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.