For Each Dictionary loop in Index order

后端 未结 3 790
一向
一向 2020-12-22 07:41

I have tried my hand using for loop with Dictionary but couldn\'t really achieve what I want to.

I have a certain variable SomeVariab

3条回答
  •  滥情空心
    2020-12-22 08:41

    You can always use a generic SortedDictionary, I only use C# so here's my example:

    SortedDictionary dict = new SortedDictionary();
    
    foreach( KeyValuePair kvp in dict) { ... }
    

提交回复
热议问题