Using VB.net, I have a namespace which I'd like to rename for the future. However, I'd also like to keep the old obsolete namespace for a time to ensure backward-compatibility for our consumers for awhile. Is there a way in .NET to have two namespaces, one ordinary and one that merely is an alternative name for the other?
In other words, I would have two namespaces with duplicate classes and modules. Obviously, I could copy all the code, but I really want to do something like
<Obsolete("Use types in namespace MyCompany.Area.ProjectName instead.")>
Namespace MyCompany.WrongArea.WrongProjectName
Inherits Namespace MyCompany.Area.ProjectName
End Namespace
(A C# answer would be nice too, if you have it.)
Perhaps you could look at something like namespace aliasing.
See: http://www.devx.com/tips/Tip/34419 for example
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