Re-order parameters

How do you re-order parameters?

public void (string lhs, string rhs) --> public void (string rhs, string
lhs)

Thanks
Jeremy

2 comments
Comment actions Permalink

Hello Jeremy,

the easiest way to do that is to use Rearrange Code feature: just press Ctrl-Alt-Shift-Right
Arrow when the caret is on the left parameter (or -Left Arrow, if the current
is the right parameter),
and the parameters will be swapped. However, this method will not update
arguments in the usages of the method.

A more involved way that updates the usages correctly is Change Signature
refactoring (ReSharper|Refactor|Change Signature...).


Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


How do you re-order parameters?

public void (string lhs, string rhs) --> public void (string rhs,
string lhs)

Thanks
Jeremy



0
Comment actions Permalink

Dmitry,

Great - thanks I'll try it out.

Regards
Jeremy

"Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
news:c8a8a0be30a28ca58a5b1d83971@news.intellij.net...

Hello Jeremy,

>

the easiest way to do that is to use Rearrange Code feature: just press
Ctrl-Alt-Shift-Right Arrow when the caret is on the left parameter
(or -Left Arrow, if the current is the right parameter), and the
parameters will be swapped. However, this method will not update arguments
in the usages of the method.

>

A more involved way that updates the usages correctly is Change Signature
refactoring (ReSharper|Refactor|Change Signature...).

>
>

Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>
>
>> How do you re-order parameters?
>>
>> public void (string lhs, string rhs) --> public void (string rhs,
>> string lhs)
>>
>> Thanks
>> Jeremy
>


0

Please sign in to leave a comment.