C
Chris Dunaway
The C# 3.0 spec (http://msdn.microsoft.com/vcsharp/future/) contains a
feature called "Implicitly typed local variables".
The type of the variable is determined at compile time based on the
expression to the right of the = sign:
var s = "Hello"; //s is strongly typed to be a string
var i = 25; //i is strongly typed to be an integer
But what I don't understand what advantage it is?
string s = "Hello"; //This is just as easy to type and is easier to
read
What's the story?
feature called "Implicitly typed local variables".
The type of the variable is determined at compile time based on the
expression to the right of the = sign:
var s = "Hello"; //s is strongly typed to be a string
var i = 25; //i is strongly typed to be an integer
But what I don't understand what advantage it is?
string s = "Hello"; //This is just as easy to type and is easier to
read
What's the story?