Refactoring - Pull Members Up and Push Members Down
Go Up to Refactoring Procedures Index
Moving members assumes that the member is either moved to the target location being deleted from the original location, or created in the target location being preserved on the original one.
To move a member:
- Select member in the Code Editor or the Modeling's Diagram View or Model View.
Tip: In the editor, place the mouse cursor on the member name.
- Choose Refactor > Pull Members Up/Push Members Down on the context menu or on the main menu.
- In the resulting dialog box, specify additional information required to make the move.
- In the top pane of the dialog box, check the members to be moved.
- In the bottom pane of the dialog box, that shows the class hierarchy tree, select the target class.
- Click OK.
- In the Refactoring window that opens, review the refactoring before committing to it. Click the Perform refactoring button to complete the move.
Tip: Moving members is more complicated than moving classes among namespaces, because class members often contain references to each other. A warning message is issued when Pull Members Up > or Push Members Down has the potential for corrupting the syntax if the member being moved references other class members. You can choose to move the class member and correct the resulting code manually.