Move Initialization to Declaration
Combines the declaration of a local variable with its initialization or first assignment.
- Having the initialization on the same line as the declaration usually makes the code a bit easier to read.
- Move Initialization to Declaration is also useful if you had conditional local initialization which has been eliminated.
Available from the context menu or via shortcuts:
- when the edit cursor, or caret is on a local variable that is declared without an initialization.