Make Explicit
In This Article
Converts the implicitly-typed local variable to a variable with an explicit type.
#Availability
Available from the context menu or via shortcuts:
- when the caret is on an implicit variable declaration (the variable doesn’t have a type explicitly declared, and it is initialized to a value of an integral type).
Note
This refactoring is only available in .NET Framework 3.
#Notes
- This refactoring is the functional opposite of Make Implicit.
#Example
│var a = "Hello World";
│Dim a = "Hello World"
Result:
string a = "Hello World";
Dim a As String = "Hello World"
#Screenshot
See Also