Is there a shortcut that allows me to repoint all classes that use the old object and repoint them all to the new class that has the new object?
and i don't mean just doing a Ctrl+F then replace.
Is there a shortcut that allows me to repoint all classes that use the old object and repoint them all to the new class that has the new object?
and i don't mean just doing a Ctrl+F then replace.
If they're all using a global variable, presumably they're referring to it as
TypeName.variableName
aren't they? Can't you just do a search and replace?
It's possible that the refactoring tools will help you with this too, but I suspect in this case a search and replace is just as easy.
EDIT: I've just tried myself, and it's certainly easy with Resharper: select the variable, right-click, Refactor, Move. Not sure about the native capabilities of VS2008 though.
Another option: change the design not to use a global variable in the first place. Dependency injection rocks :)