The Search with Pattern feature enables you to create code patterns, find their occurrences and replace them if it's necessary.

To find occurrences of code pattern
  1. On the main menu, choose ReSharper | Find | Search with Pattern. The Search with Pattern dialog box opens.
  2. Define a pattern in the Search pattern text area.
    Search with Pattern
  3. Click Find to start the search.
  4. Search results are shown in the Find Results window.
    Find Results

 Tip

Use this Edit Pattern control to edit current search pattern.
To find and replace occurrences of code pattern
  1. On the main menu, choose ReSharper | Find | Search with Pattern. The Search with Pattern dialog box opens.
  2. Click Replace button to switch to the Replace mode.
  3. Define a search pattern in the Search pattern text area.
    Search with Pattern
  4. Define a replace pattern in the Replace pattern text area.
  5. Click Replace to start the search and replace process.
  6. The Replace with Pattern dialog box opens. In this dialog box choose items you want to be replaced and click Replace.
    Replace with Pattern

See Also

Reference