The requested page is not available for the requested platform. You are viewing the content for Default platform.

Make Implicit

Converts an explicitly-typed variable declaration to an implicit one.

Availability

Available from the context menu or via shortcuts:

  • when the caret is on a variable declaration, provided that the variable is initialized to a value of an integral type.
Note

This refactoring is only available in .NET Framework 3.0 or higher (C# or VB).

Notes

Example

string a = "Hello World";
Dim a As String = "Hello World"

Result:

var a = "Hello World";
Dim a = "Hello World"

Screenshot

rsMakeImplicit

See Also