Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper - modify string interpolation back to string.Format

some days ago i followed an advice of ReSharper to modify all string.Format's to string interpolations. I accepted the suggestion and changed it all throughout the complete solution.

Since we are working in a team, i discussed this change (afterwards, when the damage was done) and we decided to go back to the string.Format's to be sure nothing was broken.

Now, is there a way to tell ReSharper to change all my string interpolations back to string.Format's? I hope there is.

Notes:

  • using Visual Studio 2015
  • using ReSharper 2017.1.3
  • Nothing broke after the change to interpolation, but it's just for esthetic reasons we decided to stay with our string.Format's

It would be great to have an easy way to do this instead of just undoing my checking to TFS (file per file, as there are other changing i want to keep).

like image 735
Verthosa Avatar asked Jul 26 '17 08:07

Verthosa


1 Answers

Put the cursor on a interpolated string | hit Alt+Enter | Convert to 'string.format' | Convert to 'string.format' in solution

like image 98
Alexander Kurakin Avatar answered Oct 16 '22 22:10

Alexander Kurakin