JetBrains Rider 2017.2 Help

Move to Another Type refactoring

Ctrl+R, O

This refactoring helps you move nested types and static members to another type (an existing one or a new one). All references and usages are automatically updated, including scenarios where a member uses other members of its original type.

Invoking the refactoring with a command

To move a static member or an inner type to another type

  1. Select a nested type or a static member in one of the following ways:
    • In the editor, set the caret at the name of a nested type.
    • Select a nested type in the Structure window.
  2. Do one of the following:
    • Press Ctrl+R, O and then choose Move To Another Type
    • Press Ctrl+Shift+R and then choose Move To Another Type
    • Choose Refactor | Move To Another Type in the main menu.
    The Move To Another Type dialog will open.
  3. Start typing the name of the target type. If you are moving the item to an existing type, pick it from the drop down list that displays all types in the solution matching your input.
  4. If necessary, you can move other nested types and static members of the containing type to another type. To do so, select the desired items in the Static Members to Move area.
  5. Optionally, specify access modifiers for the mvoed symbols in the new type.
  6. To apply the refactoring, click Next.
  7. If no conflicts are found, JetBrains Rider performs the refactoring immediately. Otherwise, it prompts you to resolve conflicts.
JetBrains Rider.'Move to Another Type' refactoring
Last modified: 27 December 2017

See Also