RAD Studio (Common)
ContentsIndex
PreviousUpNext
Change Parameters Overview (Delphi)

Adding or removing a parameter from a function is a commonly performed and tedious programming task. RAD Studio provides the Change Parameters refactoring to automate this task. You can use Change Parameters to add, remove, and rearrange function parameters. 

To use this refactoring, select a function name in the Code Editor and choose RefactorChange Params

When you use the Change Parameters refactoring, the following function signature conflicts can occur:

  • A descendant class contains an override for the function you are refactoring. When you refactor the function, any functions that override the refactored function will also be refactored.
  • A descendent class contains an overloaded version of the function that has the same signature as the refactored version. When you refactor the function, the overload is changed to an override.
  • A descendent class has an overridden method that matches the original signature. When you refactor the function, the override is changed to an overload.
Note: If you remove a parameter, you need to manually remove any method code that uses the removed parameter.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!