Make Implicit/Explicit
Purpose
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.
Availability
Available when the caret is on a variable declaration.
Usage
Place the caret to a variable declaration.
NOTE
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.
NOTE
This feature is available as a part of Code Cleanup.
See Also