Convert to String Interpolation
Converts a formatted string into string interpolation. Interpolated strings are much easier to read than formatted strings.
Available when the cursor is on a composed string expression (as shown in the code below) or on the call of one of the following methods, assuming the method argument contains formatted string.
Place the caret on a composed string expression.
The blinking cursor shows the caret's position at which the Refactoring is available.
- Use the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions Menu.
- Select Convert to String Interpolation from the menu.
After execution, Refactoring replaces the composed string to the interpolated string.
This feature is available as a part of Code Cleanup.