ReSharper Web Help

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.

To copy a type
  1. 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.
  2. 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+R, then click Copy Type.
  3. The Copy Type dialog box opens. Type a new name in the Name text box or leave the existing one.

  4. Specify a namespace where the copy of the type is to be created in the Namespace text box.
  5. Click Next. If no conflicts are found, ReSharper performs the refactoring immediately. Otherwise, resolve conflicts.

See Also