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.
- 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.
Do one of the following:
- On the main menu, choose ReSharper | Refactor | Move.
- Choose Refactor | Move on the context menu.
- Press F6Ctrl+R,O.
In the Move drop-down list, click Move to Outer Scope.
The Move to Outer Scope dialog box opens:
- Type a new name for the type in the Outer type name text box or use the existing one.
Select the Search in comments check box to update references to the class in comments.
NoteIf 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.
- Click Next. If no conflicts are found, the refactoring is performed immediately. Otherwise, resolve conflicts.
This feature is supported in the following languages/technologies:
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.