Extract Members to Partial refactoring
This refactoring helps you move selected type members to another part of a partial type. If necessary, JetBrains Rider will make the current type partial, create a new part of this type and a file for it — all in one go. All necessary imports are moved with the moved members.
To make a type partial and move selected members there
Select a type or a member in one of the following ways:
In the editor, set the caret at the name of a type or a member.
Select a type or a member in the Structure window.
- Do one of the following:
Press Ctrl+Shift+R and then choose Extract Members to Partial
Choosein the main menu.
If the current type is not partial, JetBrains Rider will suggest to create a new part. Otherwise, you can choose whether to create a new part or choose one of the existing parts to move the members.
Select type members that should be moved to the new part of a partial type. If you invoked this refactoring on selected members or on a region with some members, these members will be preselected for you.
To apply the refactoring, click Next.
- If no conflicts are found, JetBrains Rider performs the refactoring immediately. Otherwise, it prompts you to resolve conflicts.