Once More In Defense Of The var Keyword
Posted by: K. Scott Allen,
on 08 Feb 2011 |
View original | Bookmarked: 0 time(s)
Even today there are those of you who doubt the power of the var keyword in C#! Or rather, there are those of you who steadfastly refuse to use it. I think the var keyword provides a nice symmetry for local variable declarations. No one variable appears more important than another just because it has a type name with more capital letters. var newPatient = new Patient();
var surgicalProcedure = Procedures.Rhinoplasty;
var lengthOfStay = TimeSpan.FromDays(2);
We can also talk about readability,...