The Inline Variable refactoring replaces redundant variable usage with its last assigned value. To invoke the refactoring, move the caret over the local variable to apply the refactoring to
...and press &shortcut:Inline; (Refactor | Inline... ).
This will result in the following: