JetBrains Rider
 
Get JetBrains Rider
You are viewing the documentation for an earlier version of JetBrains Rider.

Inline Variable refactoring

Last modified: 08 March 2021

Refactor | Inline | Inline...

N/A

This refactoring allows you to replace all occurrences of a variable in the code with its initializer. Note that the refactoring should be only applied if the variable value stays unchanged after initialization.

In the example below, we use this refactoring to inline the reversed variable.