ReSharper Web Help

From time to time there is a need to improve existing code or adapt it to changes. When the standard refactorings do not help to achieve these goals, you can automate the changes using structural search and replace. Once you define patterns, then you use them to refactor your code in some projects or in the whole solution.

To find and replace occurrences of a code pattern
  1. On the main menu, choose ReSharper | Find | Search with Pattern. The Search with Pattern dialog box opens.
  2. Click Replace to switch to the Replace mode.
  3. Define a search pattern in the Search pattern text area.

  4. Define a replacement pattern in the Replace pattern text area.

  5. Click Replace to start searching for occurrences of your search pattern.
  6. The Replace with Pattern dialog box opens. Choose search pattern occurrences that you want to be replaced with the replace pattern, and click Replace.

See Also

Procedures

Reference