Using VB.net, I have a namespace that I would like to rename in the future. However, I would also like to keep the old obsolete namespace for a while to provide backward compatibility for our consumers for a while. Is there a way in .NET to have two namespaces, one regular and one that is just an alternate 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
(An answer to C # would also be nice if you have one.)
source
share