+ 1
how var keyword decreases the readability?? i think it is bttr to use,for faster working..
3 Respostas
+ 2
yes it is much easier to use than other data types.
So if you know what is the right data type to use then why don't you use it instead of always using var? It seems like your making yourself an idiot if other see your program! Haha and it is very irritating to see a source code full of var.
Just explaining :)
0
var result = _carService.GetCars(); // What is in the result variable? Can you tell it on the first sight? How would you work with it? IList<Car> cars = _carService.GetCars(); // Now I know what to do. I see I can iterate through the cars. :)
0
adding to that, var cud be used like,
var employee = new Employee();
here right hand side clearly says what type the employee is going to be, so quite readable.