element to dictionary c# on initialize code example
Example 1: c# inline initialize dictionary
var testDict = new Dictionary<string, string>() { ["key1"] = "value1", ["key2"] = "value2" };
Example 2: add values to dictionary c# while initializing
AllCities.Add(new City("Rome") { Names = { { "DE", "Rom" }, { "...", "..." } } });