Telerik® JustCode™ can suggest you to move a variable declaration to outer scope.
Not relevant: ASP.NET, XAML, HTML
The behavior can be controlled in JustCode Options -
JustCode / Options / Code Analysis / Hints.
When "Show hint for move to outer scope" option is checked in the options dialog,
then Telerik® JustCode™ suggests you to move a variable declaration to an outer scope when appropriate.
- Position the caret over a variable declaration.
Press Alt+Enter. From the pop-up menu, select Move to outer scope.
The result is: