The Copy Type refactoring allows users to copy a class, interface, struct, or enum from one namespace to another, or clone it within the same namespace.
- Select the class, interface, struct, or enum in Class View or Object Browser, or position the caret at its name in the editor.
- Do one of the following:
- On the main menu, click ReSharper | Refactor | Copy Type.
- Right-click the type, and on the shortcut menu, click Refactor | Copy Type.
- Press Ctrl+Shift+R, and then select Copy Type.
- In the Name text box, specify the new name of the type copy.
- In the Namespace text box, specify the namespace where the copy of the type is to be created.
- Click Continue. If no conflicts are discovered, the copy of the type is created immediately.