Telerik® JustCode™ by Progress

Telerik® JustCode™ can suggest you to move a variable declared inside a method to the parameters of the method.


Language Support

Supported: C#, VB.NET

Not supported: JavaScript, ASP.NET, XAML, HTML

The behavior can be controlled in JustCode Options - JustCode / Options / Code Analysis / Hints / C#.

When "Show hint for move variable declaration to parameter" option is checked in the options dialog, then Telerik® JustCode™ suggests you to move a variable declaration to parameter.

To move a variable declaration to parameter

  1. Position the caret on a variable declaration inside a method.

  2. Select Move To Parameter from the VisualAid's Fixes menu.

    Move To Parameter
  3. The variable will be moved to parameter and all method invocations will be updated with the variable's initialization expression (or default value if such is missing). The result is:

    Move To Parameter Result

JustCode will also try to find the best place for the parameter, so that no other overload of the method is matched.

See Also