I have a static class I am deprecating and modifying the class to force clients to use an instance variable.
Question is, how do I handle allowing the previous static class to remain and be used (with obsolete attribute) and also allow the new non static class to be used as well (same name, same method names)?
Is this possible?
There are several ways you can use, but none do exactly what you want:
staticmodifier, making it a normal non-static class, and optionally make it partial, implementing the new instance related code in a second file. With this method, however, you will not be able to obsolete the entire static class, as you have only one class.If you make all the old static members obsolete, I would go for option nbr. 1.