I've read that :
The team have generally been busy implementing other variations on initializers. For example you can now initialize a Dictionary object
But looking at :
var Dic = new Dictionary<string,int>{ {"x",3}, {"y",7} };
vs.
var Dic = new Dictionary<string,int>{ ["x"]=3, ["y"]=7 };
I don't see where the benefit is. It looks the same. Both are nothing more than a name-value collection.
They swapped pairs of curly braces for pairs of square brackets and some commas
Question:
What is the added value for using the new syntax ? A real world example would be much appreciated.
$xxx
is nice , but to think that they just changed from curly braces to brackets...? – Eldwen