Maddus Mattus said:Massif said:*snip*
I hate var's
they are for lazy programmers
and worker.DoWork() would not be possible, because DoWork has a return type. Ignoring the return is not 'first class' as Erik would call it
I used to think so too, but after programming in Visual Basic properly, less is more.
In C# you have
MyClass myClass = new MyClass
Whereas in VB you have
Dim MyClass = As New MyClass
which is elegant, notwithstanding the 'Dim' keyword of course - what a tragedy
var myClass = new MyClass
results in far less code, and is infinitely more readable in the long run, especially with long namespaces and properly formatted Linq queries.