Dokumentasyon
-
Learn more about: Move Definition Location
-
Learn more about: Rename
-
Create Declaration / Definition
Learn more about: Create Declaration / Definition
Hindi na suportado ang browser na ito.
Mag-upgrade sa Microsoft Edge para samantalahin ang mga pinakabagong tampok, update sa seguridad, at teknikal na suporta.
What: Turn a fragment of code into its own function.
When: You have a fragment of existing code in some function that needs to be called from another function.
Why: You could copy/paste that code, but that would lead to duplication. A better solution is to refactor that fragment into its own function, which can be called by any other function.
How:
Highlight the code to be extracted:
Next, do one of the following:
In the Extract Function/Method (Experimental) window, enter the new function name, select where you want the code to be placed, and click the OK button.
The new function will be created where you specified, a function prototype in the corresponding header file, and the original code will be changed to call that function.
Dokumentasyon
Learn more about: Move Definition Location
Learn more about: Rename
Create Declaration / Definition
Learn more about: Create Declaration / Definition