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

Why would var be a bad thing?

The writers of the .Net Framework Design Guidelines (awesome book) that came out in November 2008 recommend considering using var when the Type is obvious and unambiguous. On the other hand, if using var would result in an ambiguity when reading the code, as Anton Gogolev pointed out, then it’s better not to use it. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)