How to insert an item into a key/value pair object?

后端 未结 7 981
长情又很酷
长情又很酷 2021-01-31 13:23

Ok...here\'s a softball question...

I just need to be able to insert a key/value pair into an object at a specific position. I\'m currently working with a Hashtable whic

相关标签:
7条回答
  • 2021-01-31 14:15

    I would use the Dictionary<TKey, TValue> (so long as each key is unique).

    EDIT: Sorry, realised you wanted to add it to a specific position. My bad. You could use a SortedDictionary but this still won't let you insert.

    0 讨论(0)
提交回复
热议问题