Possible Duplicate:
Using var outside of a method
I've searched for this a bit, but am not too sure of the search terms so didn't find anything.
Why can't i do this:
class foo
{
var bar = new Dictionary<string, string>();
}
Guessing there must be a very good reason, but i can't think of it!
I'm more interested in the reasoning, rather than the because "C# doesn't let you" answer.
EDIT: Edited Dictionary
declaration, sorry (just a typo in the example)!