Can I mark an entire namespace as obsolete in .NET Framework (3.5 and 4) somehow, or alternativly an entire project?
Obsolete refers to outdated computer hardware, software, technology, services or practices that are no longer used, even if they are in working condition. A technology often becomes obsolete when replaced by a newer or better technology.
An obsolete attribute, in C#, is a declarative tag used while declaring a type or a member of a type to indicate that it should no longer be used.
This attribute is found in the System namespace. The Obsolete attribute decorates a program element by putting the word “Obsolete” above it inside square brackets. Since it is an attribute, we can use either Obsolete or ObsoleteAttribute.
It is not possible. I guess reason is that namespace can span accross different assemblies and even users of the library can use same namespace, so it would obsolete not only your code. Namespace is basically a syntax sugar for name prefix. Namespace can not even be target of an attribute.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With