Nested Dictionary collection in .NET

后端 未结 6 1996
伪装坚强ぢ
伪装坚强ぢ 2020-12-17 06:42

The .NET Dictionary object allows assignment of key/values like so:

Dictionary dict = new Dictionary&l         


        
6条回答
  •  天命终不由人
    2020-12-17 07:27

    You can do this using the standard Dictionary, you just have to declare the nesting:

    Dictionary> dict = ...
    string test = dict["first"]["second"]
    
    Dictionary>> dict = ...
    string test = dict["first"]["second"]["third"]
    
    etc
    

提交回复
热议问题