Why doesn’t C# let you declare multiple variables using var?
When we designed the feature I asked the community what var x = 1, y = 1.2; should mean. The question and answers are here: http://blogs.msdn.com/b/ericlippert/archive/2006/06/26/what-are-the-semantics-of-multiple-implicitly-typed-declarations-part-one.aspx http://blogs.msdn.com/b/ericlippert/archive/2006/06/27/what-are-the-semantics-of-multiple-implicitly-typed-declarations-part-two.aspx Briefly, about half the respondants said that the obviously correct thing to do was to make x and y both double, and about half the respondants said that … Read more