清单和收藏最适合二手收藏 [英] List and Collection which is best for used collection

查看:112
本文介绍了清单和收藏最适合二手收藏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在最适合列表和集合的asp.net中.

Hi,

In asp.net which is best for List and Collection???

推荐答案

显然,要问最佳"是什么,您需要定义谓词更好,然后" ".你能做到吗?并且出于某些特定目的,这应该对您更好",否则您不能将其归于任何意义.此外,术语集合"比列表"更笼统,这只会增加此问题的不正确性.

另外,以这种方式查看它.从所有方面来看,没有人愿意使用比其他任何糟糕"的数据结构.如果至少有两个这样的可比结构,则没有人会使用更差"的结构.请使用System.Collections.Generic(最早在引入泛型时的v.2.0版本起,废弃了非泛型,非专业的集合).如果某些集合类与其他集合类具有可比性,并且差"了一些其他类,则Microsoft不会将其包括在库中.那不合逻辑吗?请参阅:
http://msdn.microsoft.com/en-us/library/system.collections. generic.aspx [ ^ ].

-SA
Apparently, to ask what is "best", you need to define the predicate "better then". Could you do it? And this should be "better for you", for some particular purpose, otherwise you cannot attribute any sense to it. Besides, the term "collection" is more general then "list", that only add to the incorrectness of this question.

Also, look at it at this way. Nobody wants to use any data structure which is "worse" than some other by all measures. If at least two of such comparable structures existed, no one would use the "worse" one. Take System.Collections.Generic (non-generic, not-specialized collections are rendered obsolete as early as of the v.2.0 when generics were introduced). If some of the collection classes was comparable to others and was "worse" then some others, Microsoft would not include it in the library. Isn''t that logical? Please see:
http://msdn.microsoft.com/en-us/library/system.collections.generic.aspx[^].

—SA


hanselman的列表与集合


这篇关于清单和收藏最适合二手收藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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