ReSharper Web Help

The Move to Another Namespace refactoring helps you move the chosen type from one namespace to another. All using directives in the files where the type is used are updated correspondingly.

To move a type to another namespace
  1. Place the caret at the name of a class or interface, etc. in the editor or select it in the Class View window or in the Object Browser window.
  2. Do one of the following:
    • On the main menu, choose ReSharper | Refactor | Move.
    • Choose Refactor | Move on the context menu.
    • Press F6Ctrl+R,O.
    The Move drop-down list is displayed.
  3. In the Move drop-down list, click Move to Another Namespace. The Move to Another Namespace dialog box opens:

    Refactorings__Move__Type_to_Another_Namespace__dialog_box

  4. Specify the target namespace by typing its name or using the Target namespace name drop-down list.
  5. Click Next. If no conflicts are found, ReSharper performs the refactoring immediately. Otherwise, resolve conflicts.

This feature is supported in the following languages/technologies:

C# VB.NET HTML ASPX Razor JavaScript TypeScript CSS XML XAML RESX Build Scripts
feature_available feature_available feature_available

Tip

The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see the corresponding topics in the ReSharper by Language section.

See Also

Procedures: