3 ms·
You are right. I was thinking of Java, C, C++, and C# but my knowledge about the last ones was outdated (long ago) https://stackoverflow.com/questions/138600/i
by singularity2001 5y ago
You are right. I was thinking of Java, C, C++, and C#
but my knowledge about the last ones was outdated (long ago)
https://stackoverflow.com/questions/138600/initializing-a-static-stdmapint-int-in-c https://stackoverflow.com/questions/138600/initializing-a-st...
https://stackoverflow.com/questions/15501202/c-sharp-nested-dictionaries https://stackoverflow.com/questions/15501202/c-sharp-nested-...
IF you are happy with some constraints or the syntax exploding with every level of tree depth added:
public Dictionary<string, Dictionary<string, string>> info =
new Dictionary<string, Dictionary<string, string>> ....
- jakopo87 5y agoYou can define type aliases at the begin of the file to reduce verbosity, as example: using dic = System.Collections.Generic.Dictionary<string, string>; Otherwise you can use an anonymous type: var person = new { name = "frank", address = new { city = "Berlin ", zip = 12345 } }; In this case you get a plain object, but all fields area read only.
- singularity2001 5y agoInteresting and beautiful