Extract Method Dialog Box

See Also

Use this dialog box to specify options for the Extract Method refactoring command. You can use the Extract Method command to create a new method from selected code in the IDE. When you use this operation, a method is created and selected code is replaced with a call to the new method.

You can open the Extract Method dialog box by selecting the block of code that you want to have extracted into a method and then choosing Refactor > Extract Method.

The dialog box has the following fields:

If you select the Preview All Changes checkbox, you need to follow these steps to complete the refactoring:

  1. Click Next.

    The Refactoring window opens and displays a tree view of the code to be affected by the refactoring.

  2. Check the items displayed in the Refactoring window to make sure that you want them all changed. Clear the checkbox next to any parts of the code that you do not want changed.
  3. Click Do Refactoring.
See Also
About Refactoring
Refactoring: Quick Reference
Undoing Refactoring Changes

Legal Notices