I read the book How to work with legacy code
It said that in many IDEs there is an option to automatically
-
extract an interface from a class
-
replace classes members from concrete to the new interface
I have found the first option in VS2010, does anyone know how to do the second?
Think out of the box.
First rename your class
MyClasstoIMyClassand tell VS to rename referencesMyClassand don’t rename referencesIMyClass