Dictionary initialize in C# 6.0
Adds a new ability to use the Key / indexer to map with the Values directly during the initialization itself.
Adds a new ability to use the Key / indexer to map with the Values directly during the initialization itself.
Dictionary<int, string> students = new Dictionary<int, string> {
[1] = "Student 1" ,
[2] = "Student 2",
[3] = "Student 3",
[4] = "Student 4",
};
[1] = "Student 1" ,
[2] = "Student 2",
[3] = "Student 3",
[4] = "Student 4",
};