Move Type to Outer Scope refactoring
This refactoring helps you move a nested type one level up. All corresponding references are automatically updated, even if the nested type uses members of the parent type.
Move a type to outer scope
Select a nested type in one of the following ways:
In the editor, place the caret at the name of a nested type.
Select a nested type in the Solution Explorer.
Select a nested type in the Structure window window.
Do one of the following:
Press F6 and then choose Move to Outer Scope
Press Ctrl+Alt+Shift+T and then choose Move to Outer Scope.
Choose
from the main menu.
The Move to Outer Scope dialog will open.
Optionally, you can specify a different name for the type.
To apply the refactoring, click Next.
If no conflicts are found, JetBrains Rider performs the refactoring immediately. Otherwise, it prompts you to resolve conflicts.
![JetBrains Rider: refactorings: Move type to outer scope JetBrains Rider: refactorings: Move type to outer scope](https://resources.jetbrains.com.cn/help/img/rider/2024.2/Refactorings__Move__Type_to_Outer_Scope__outer_type_name.png)