Use Base Type Where Possible refactoring
This refactoring helps replace references to a type with references to one of its base types. Rider 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 is
and typeof
operators.
To use base type where possible
- Select a type in one of the following ways:
- In the editor, set the caret at the name of a type.
- Select a type in the Structure window.
- Do one of the following: The Use Base Type where Possible dialog will open.
- Select one of base types.
- Optionally, select whether you want to replace type usages in the
is
operator and/or in thetypeof
operator. - To apply the refactoring, click Next.
- If no conflicts are found, Rider performs the refactoring immediately. Otherwise, it prompts you to resolve conflicts.
Last modified: 11 October 2017