任何可以随机访问.net中元素的集合 [英] any collections that gives random access to the elements in .net

查看:76
本文介绍了任何可以随机访问.net中元素的集合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我的要求是我需要一个可以随机存取其物品的收藏集..有人可以建议我...

thnx

hi all ,
Mine requirement is that I need a collection that gives me random access to its items ..can somebody suggest me ...

thnx

推荐答案

大多数情况下,请查看名称空间System.Collections.Generic.您的选择应取决于您的要求.请参阅 http://msdn.microsoft.com/en-us/library/0sbxh9x2.aspx [^ ].

(形成那些可能认为他们不同意的人:随机访问"可能表示整数索引,但通过Key进行的访问也是随机访问;此外,基于Key进行访问的实现关联容器的通用类还允许通过整数索引进行访问.)

—SA
Most of them do, look at name space System.Collections.Generic. You choice should depend on your requirements. See http://msdn.microsoft.com/en-us/library/0sbxh9x2.aspx[^].

(Form those who might think they disagree: "random access" might mean by integer index, but the access by Key is also a random access; also, the generic classes implementing associative container based on access by Key also allow access by integer index.)

—SA


这篇关于任何可以随机访问.net中元素的集合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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