Copy Type refactoring
Refactor | Copy...
This refactoring allows you to copy a class, interface, struct, or enum defined in your solution from one namespace to another, or clone it within the same namespace. For partial types, all parts will be copied even if they are located in separate files.
Select a type in one of the following ways:
In the editor, place the caret at the name of a type.
Select a type in the Solution Explorer.
Select a type in the Structure window window.
Do one of the following:
Press CtrlShift0R and then choose Copy Type.
Choose Refactor | Copy Type from the main menu.
The Copy Type dialog will open.
Specify a name for the copied type and a namespace where it should be added.
To apply the refactoring, click Next.
If no conflicts are found, JetBrains Rider performs the refactoring immediately. Otherwise, it prompts you to resolve conflicts.
tip
Right after the refactoring has been completed, all changes that it makes anywhere, including other files, are registered as a single operation. So you can use the Undo action Ctrl0Z to roll back all these changes with a single keystroke.
