ReSharper 2017.1 Help

Inline Resource refactoring

ReSharper | Refactor | Inline

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:
    or at the resource name in a.resx file:
  2. In the main menu, choose ReSharper | Refactor | Inline or press Ctrl+Alt+N.
  3. In the Inline Resource dialog 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.
  4. Click Next to apply the refactoring.
Last modified: 12 October 2017

See Also