Converts an explicitly-typed variable declaration to an implicit one and vice versa. You can use implicitly typed variables to avoid redundancy and increase code readability. On the other hand, the explicit typing helps to avoid mistakes.
Available when the caret is on a variable declaration.
Place the caret to a variable declaration.
The blinking cursor shows the caret's position at which the Refactoring is available.
- Use the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions Menu.
- Select Make Explicit from the menu (Make Implicit if the variable is declared explicitly).
After execution, the Refactoring changes the variable type to implicit or changes the implicit type to the most suitable explicit type.
This feature is available as a part of Code Cleanup.