ReSharper Help

Inline Resource

ReSharper | Refactor | Inline
Ctrl+Alt+N

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

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+N.
  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.

See Also

Last modified: 3 September 2015