Extract Method

From RAD Studio
Jump to: navigation, search

Go Up to Refactor Menu

Refactor > Extract Method Shift+Ctrl+M

Turns a selected code fragment into a method. RAD Studio moves the extracted code outside of the current method, determines the needed parameters, generates local variables if necessary, determines the return type, and replaces the code fragment with a call to the new method.

Item Description

Current Method

Displays the name of the method in which the code fragment currently resides.

New method name

Specifies the name to be used for the newly extracted method. ExtractedMethod is displayed by default, but you can overtype it.

Sample extracted code

Displays the code that will be generated for the newly extracted method.

See Also