ReSharper 8.0 Web Help

The Move Type to Outer Scope refactoring helps you move an inner type one level up. All corresponding references are automatically updated, even when the inner class uses methods or fields of the outer class.

To move a type to outer scope
  1. Place the caret at the name of an inner type 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 Outer Scope. The Move to Outer Scope dialog box opens:


  4. Type a new name for the type in the Outer type name text box or use the existing one.
  5. Select the Search in comments check box to update references to the class in comments.


    If the Search in comments check box is selected, ReSharper prompts you to rename usages found in comments. Select check boxes next to items that you want to be updated.
  6. Click Next. If no conflicts are found, the refactoring is performed 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


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