This blog is a knowledge base...where I clip cool tricks and urls

C# Microsoft have added features that makes the language just a little bit dynamic

Dictionary<string, string> dic = new Dictionary<string, string>()
.Init(
new {
Key1
= "val1",
Key2
= "val3"
});

For version 3.0 of C# Microsoft have added features that makes the language just a little bit dynamic but still strongly typed. One of this feature is collection initializers for lists and dictionaries like we initialized arrays on earlier versions:

 blog it

No comments: