Convert to Function
The Convert to Function refactoring lets you convert a method or a block of code to a function.
To convert to a function
- In the editor, place the cursor within the name of the method or select a block of code that you want to convert to a function.
- On the main menu or on the context menu of the selection, choose .
- In the Change Signature dialog that opens, make changes if necessary.
-
To perform the refactoring right away, click
Refactor.
To see the expected changes and make the necessary adjustments prior to actually performing the refactoring, click Preview.
Last modified: 5 December 2016