The Move Type to Outer Scope refactoring helps move an inner type up a level. All corresponding usage references are automatically updated, even when the inner class uses methods or fields of the outer class.
To move a type to outer scope
- Position the caret at an inner type.
- On the ReSharper menu or context menu, choose Refactor | Move, or press F6. The Move drop-down list appears, choose Move to Outer Scope command. The Move to Outer Scope dialog box opens:
- In the Outer type name text box, specify a new name for the type. You can use the existing type name as well.
- To update references to the class in comments, select Search in comments.
- Click Next.
- If you selected Search in comments, ReSharper suggests that you rename located usages. 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 .
