JustCode

The Inline Variable refactoring replaces all occurrences of the selected variable with its initializer.

Note

Language Support

Supported: C#, VB.NET, JavaScript

Not relevant: ASP.NET, XAML, HTML

To inline a variable

  1. Position the caret over the variable you want to inline.

    Inline Variable Select
  2. Press Alt+Insert. From the pop-up menu select Inline Variable.

    Inline Variable Created
Caution

A variable cannot be inlined if it is modified after initialization.

Tip

To inline a variable you can also navigate on the main menu. Choose JustCode | Refactor | Inline Variable, or just press Ctrl+R, Ctrl+I

See Also

Other Resources