concept implicitly type local variable in category .net
appears as: Implicitly typed local variables, n implicitly typed local variable

This is an excerpt from Manning's book LINQ in Action.
This looks like variants in VB, but the new syntax and variants aren’t the same. Implicitly typed local variables are strongly typed. For example, the following VB.NET code isn’t valid and will return an error stating that conversion from type String to type Integer isn’t valid:
With implicitly typed local variables
, we no longer have to write the types of local variables twice. The compiler infers the types automatically. This means that even though we use a simplified syntax, we still get all the benefits of strong types, such as compile-time validation and IntelliSense.
, we no longer have to write the types of local variables twice. The compiler infers the types automatically. This means that even though we use a simplified syntax, we still get all the benefits of strong types, such as compile-time validation and IntelliSense.