Pull Member Up
- 2 minutes to read
Moves a member with its dependencies to a base type.
Available when the caret is in a type member. The base type code should exist in the current solution.
This refactoring is not available for interfaces.
Place the caret in a member declaration.
The blinking cursor shows the caret’s position at which the Refactoring is available.
- Press the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions menu.
- Select Pull Member Up from the menu. If there are several base types in the current solution, you can select the target type from the submenu.
After execution, the Refactoring moves a member with its dependencies to a base type.