c# dictionary initializer add or modify code example
Example 1: c# initialize dictionary
Dictionary<int, string> dictNew = new Dictionary<int,string>()
{
{1, "true"},
{2, "false"}
}
Example 2: add values to dictionary c# while initializing
AllCities.Add(new City("Rome") { Names = { { "DE", "Rom" }, { "...", "..." } } });