Use Obsolete attribute when doing major re factor
Sometimes when doing a large re factor of a .Net code base which requires a change in method signature you can end up with a long chain of changes which can become overwhelming by simply changing the method signature and fixing tests and production code.
Instead of employing this approach, try marking the existing method with the Obsolete attribute and create a new method with the same name and the required signature. The tests and code can then be updated in a more incremental manner which I found decreased stress and led to more considered re factoring.
Written by Phil Wheldon
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Refactoring
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#