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
Position the caret over the variable you want to inline.
Press Alt+Insert. From the pop-up menu select Inline Variable.
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