I need to replace all the ocurances of obj.Method1() to obj.Method2() where obj is an instances of the same class. Does ReSharper or VS2010 allow this?
I need to replace all the ocurances of obj.Method1() to obj.Method2() where obj is
Share
I’d cheat – Do a 3-point symbolic rename (Right-click->Rename on a method name)
None of this will change code functionality but will update all your code to use the correct name, except the methods themselves are now named incorrectly – simply rename the methods to by hand and voila – A little bit hacky but fast and effective.
This does rely on all method calls being in managed code (so that VS knows how/what to rename). If you have XML comments, C# rename handles this well but VB doesn’t – I assume since you mention ReSharper, you’re using C#?
This also assumes the method signatures are identical (if not, get ready for a lot of copy/pasting)