通用密钥/价值对集合中的保留插入顺序? [英] Generic Key/Value pair collection in that preserves insertion order?

查看:134
本文介绍了通用密钥/价值对集合中的保留插入顺序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找类似字典< K,V>但是保证它保留插入顺序。因为Dictionary是一个散列表,我不认为它是。

I'm looking for something like a Dictionary<K,V> however with a guarantee that it preserves insertion order. Since Dictionary is a hashtable, I do not think it does.

是否有一个通用的集合,或者我需要使用一个旧的.NET 1.1集合?

Is there a generic collection for this, or do I need to use one of the old .NET 1.1 collections?

推荐答案

System.Collections.Specialized.OrderedDictionary

这篇关于通用密钥/价值对集合中的保留插入顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆