If this is code inside a method, then this is why the var
keyword has existed since C# 3.0:
var Lines = new Dictionary<string, string>();
If this is in a class declaration, then you can't use the var
keyword. I admit to not knowing the specifics of why implicit typing isn't permitted at the class level, but suffice it to say that it isn't. Explicit typing is required:
private Dictionary<string, string> Lines;
Completely separate from that declaration would be the initialization of that variable. Which can be done on the same line, or in a constructor, or in a method, etc. But any new
keyword is itself going to need to be explicitly told the type:
new Dictionary<string, string>()
These are two completely different things which both require the type to be specified for their own discrete and very good reasons.
Ultimately, any time you ask "why doesn't the language do this?" what you should really be asking is "should the language do this? is it really necessary?"
As Eric Lippert once said to me in a previous question: "By eliminating [that unnecessary feature], none of the rules for [that unnecessary feature] needed to be though of, argued about, designed, specified, implemented, tested, documented, shipped to customers, or made compatible with every future feature of C#."
It's easy to shout from the bleachers. It's less easy to design and support a major programming language. Maybe one day this feature will exist, and you're welcome to propose it to the team. But as for "why doesn't it exist", the team simply never made that happen.