Hi!
The code I was writing, I often used something such as:
var dataTDS = new SampleDataConstructorTDS();
var unusedLocations = new Stack <PLocationRow>();
instead of
SampleDataConstructorTDS dataTDS = new SampleDataConstructorTDS();
Stack <PLocationRow> unusedLocations = new Stack <PLocationRow>();
The reasoning was, it is far easier on the eyes and is equivalent from the compilers point of view.
At least, that is what my little c# book is trying to tell me: The compiler statically inserts the right type based on the expression on the right hand side of the "=". This is said to work from c# 3 onwards.
Now I just used this syntax all over the place, and it worked for a reason I do not understand (although only .NET 2 is installed).
For now, after doing a "nant clean" and "nant generateSolution", the compiler is mad at me. What did I do wrong? Should I change the code back to the explicit typing shown above, or do I just miss something? What is your "official" take in this?