When, if ever, would you expect classes marked as obsolete to be removed from the .NET framework?

StackOverflow https://stackoverflow.com/questions/1612256

  •  06-07-2019
  •  | 
  •  

Question

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:

  1. 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?

  2. 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?

Was it helpful?

Solution

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.

OTHER TIPS

The most reasonable way would be to leave them there forever in order to keep backward compatibility.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top