The Move Type to Outer Scope refactoring helps 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.
On the ReSharper menu or context menu, choose
Refactor | Move, or press
drop-down list appears, click
Move to Outer Scope.
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.