ReSharper 8.0 Web Help

ReSharper | Refactor | Inline
Ctrl+Alt+NCtrl+R,I

The Inline Resource refactoring substitutes resource usages with the original string and optionally deletes the corresponding resource entries from resource files.

Tip

If a string literal is too long, press Enter anywhere within the string and ReSharper will automatically put the right part of it to the next line and insert the + sign. Delete the + and the string parts will be concatenated.

To inline resource
  1. Set the caret at the resource usage in a code file:
    Resources__Refactorings__Move_Resource_01
    or at the resource name in a .resx file:
    Resources__Refactorings__Move_Resource_03
  2. On the main menu, choose ReSharper | Refactor | Inline or press Ctrl+Alt+NCtrl+R,I.
  3. In the Inline Resource dialog box that appears, specify refactoring options:
    • Inline all usages: if selected, replaces all resource usages in the project with the original string. If deselected, replaces only the resource usage where you invoked this refactoring. Note that this option works only if you invoked the refactoring from the code file.
    • Remove inlined resource declaration: if selected, removes resource declaration from all related resource files. If deselected, leaves declarations intact.
    Resources__Refactorings__Inline_Resource_02
  4. Click Next to apply the refactoring.