The Search with Pattern feature enables you to create code patterns, find their occurrences and replace them. This feature is much more powerful and flexible than common search tools. Moreover, you can set a severity level for a code pattern so that ReSharper highlights code matching the search pattern as a hint, suggestion, warning, or error, and provides quick-fixes.
So, using structural search and replace you can:
- define your own search patterns as complicated as necessary
- replace code smells or obsolete code constructs, a replacement pattern can be rather complicated as well
- store all patterns in the catalog and share them with team members
- see code fragments that match a search pattern highlighted in the editor
- use a replacement pattern as a quick-fix to fix problems right here right now