The Copy Type refactoring allows you to copy a class, interface, struct, or enum from one namespace to another, or clone it within the same namespace.
- Place the caret at the name of a class, interface, struct, or enum in the editor or select it in the File Structure window, in Class View or in Object Browser.
Do one of the following:
- On the main menu, choose ReSharper | Refactor | Copy Type.
- Right-click the type, then click Refactor | Copy Type on the context menu.
- Press Ctrl+Shift+RCtrl+Shift+R, then click Copy Type.
The Copy Type dialog box opens.
Type a new name in the Name text box or leave the existing one.
- Specify a namespace where the copy of the type is to be created in the Namespace text box.
- Click Next. If no conflicts are found, ReSharper performs the refactoring immediately. Otherwise, resolve conflicts.