Copy Type refactoring
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.
To copy a type
- 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: 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, Rider performs the refactoring immediately. Otherwise, it prompts you to resolve conflicts.