0
what is meant var??why use var??
2 Answers
+ 3
var is an implicit data type. The compiler decides what type of data it holds. For example var x = 3.4;
The compiler knows thats a double floating point number. For more info check microsoft c# reference page.
+ 2
Because it is boring to write like this:
List<string> mylist = new List<string>();
And with var:
var mylist = new List<string>();
So var makes it not so boring.