209.
C# 3.0 introduces implicitly typed local variables. You do not need to specify a type for a local variable any more! The compiler figures out which type to use for you. So what do you think; does the following code work?
namespace ImplicitTypes
{
class Program
{
static void Main()
{
var v = "Hello World!";
v = 10;
System.Console.WriteLine(v);
}
}
}
View Description
var v = "Hello World!" has already established that the type of v is string therefore you can't assign an integer being 10 to a string