Refactoring - Extracting Superclass
Go Up to Refactoring Procedures Index
This topic explains how to use the "Extract superclass" operation".
To use the "Extract superclass" operation:
- Select one or more code elements (class, interface, field, method, event, property, or indexer) in the Code Editor or the Modeling's Diagram View or Model View.
- On the main menu, choose Refactor > Extract Superclass.
Tip: Alternatively, you can choose Refactor > Extract Superclass on the context menu of the selection.
- In the Extract superclass dialog box, enter the name for the superclass and designate its namespace, if applicable.
- Specify the members to be used in the resulting superclass by setting or clearing the respective check-boxes. If applicable, indicate that a method is abstract in the extracted superclass.
- Click OK. The Refactoring window opens allowing you to review the refactoring before committing to it.
- Click the Perform refactoring button to complete the extraction.