Refactoring – Reorder Parameters
Refactoring is a disciplined technique of restructuring your existing body of code by altering its internal structure without changing its external behavior.
This refactoring allows you to change the order of a member's arguments. Code is much easier to read and understand if arguments are kept in a logical order, or at least in a consistent order. To increase the consistency and readability of the code, you can rearrange the order of parameters passed to a method.
Using the Reorder Parameters refactoring, you can quickly clean up the existing code model. Begin by selecting the method containing the parameters you wish to reorder, and activate the Reorder Parameter refactoring. Select the argument to move and use the arrow buttons to move it higher or lower in the list. When you are satisfied with the order of the parameters, preview the reference change and its impact on your code, before accepting it.