Use Base Type Where Possible refactoring
This refactoring helps replace references to a type with references to one of its base types. ReSharper will analyze all references to the type in the whole solution and update those that can be safely replaced with references to the selected base type. Optionally, you can also replace references in
To use base type where possible
- Select a type in one of the following ways:
- Do one of the following:
- Press Ctrl+Shift+R and then choose Use Base Type where Possible
- Right-click and choose Refactor | Use Base Type where Possible in the context menu.
- Choose in the main menu.
- Select one of base types.
- Optionally, select whether you want to replace type usages in the
isoperator and/or in the
- To apply the refactoring, click Next.
- If no conflicts are found, ReSharper performs the refactoring immediately. Otherwise, it prompts you to resolve conflicts.
This feature is supported in the following languages/technologies:
The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see corresponding topics in the ReSharper by Language section.