C#DIctionary size limit [英] C# DIctionary size limit
问题描述
大家好,
我有一个由几个字符串和int成员组成的A类。
我想管理大量的(几千个) )A对象
在字典中每个对象都有其唯一的密钥。
是否有任何已知的限制或最佳实践,您认为我应该
考虑?
谢谢,
Orsula.z
Hi Guys,
I have a class A composed of several string and int members.
I would like to manage a huge amount (several thousands) of A objects
in a dictionary where each object has its unique key.
Is there any known limitation or best practice that you think I should
consider?
Thanks,
Orsula.z
推荐答案
8月12日,4:53 * pm,orsula< orsul ... @ gmail.comwrote:
On Aug 12, 4:53*pm, orsula <orsul...@gmail.comwrote:
我有一个A类由几个组成字符串和int成员。
我想在字典中管理大量(数千个)A对象
,其中每个对象都有唯一的密钥。
是否有任何已知的限制或最佳做法,您认为我应该考虑?
?
I have a class A composed of several string and int members.
I would like to manage a huge amount (several thousands) of A objects
in a dictionary where each object has its unique key.
Is there any known limitation or best practice that you think I should
consider?
几千实际上相当小。基本上如果你已经在内存中为对象和一点开销留出了足够的空间,那么
字典应该没问题。
Jon
"Several thousand" is actually reasonably small. Basically if you''ve
got enough room in memory for the objects and a bit of overhead, the
dictionary should be fine.
Jon
Orsula,
请注意,与每个系统集合一样,您只需添加
对象的引用,而不是值本身,因此字典可以实际上非常小。
Cor >
" orsula" <或****** @ gmail.comschreef在bericht
新闻:59 ************************ ********** @ k13g2000 hse.googlegroups.com ...
Orsula,
Be aware that as with every system collection, you are only adding the
references of the objects, not the values itself, therefore a dictionary can
be in fact very small.
Cor
"orsula" <or******@gmail.comschreef in bericht
news:59**********************************@k13g2000 hse.googlegroups.com...
嗨大家好,
我有一个由几个字符串和int成员组成的A类。
我想在字典中管理大量(数千个)A对象
对象有其独特的关键。
您认为我应该考虑是否有任何已知的限制或最佳实践?
谢谢,
Orsula.z
Hi Guys,
I have a class A composed of several string and int members.
I would like to manage a huge amount (several thousands) of A objects
in a dictionary where each object has its unique key.
Is there any known limitation or best practice that you think I should
consider?
Thanks,
Orsula.z
8月12日,7:11 * pm,Jon Skeet [ C#MVP]" < sk ... @ pobox.comwrote:
On Aug 12, 7:11*pm, "Jon Skeet [C# MVP]" <sk...@pobox.comwrote:
8月12日,4:53 * pm,orsula< orsul ... @ gmail.comwrote:
On Aug 12, 4:53*pm, orsula <orsul...@gmail.comwrote:
我有一个由几个字符串和int成员组成的A类。
我想管理大量的(数千)A对象
在字典中,每个对象都有唯一的密钥。
I have a class A composed of several string and int members.
I would like to manage a huge amount (several thousands) of A objects
in a dictionary where each object has its unique key.
是否有任何已知限制或最佳做法,您认为我应该考虑
?
Is there any known limitation or best practice that you think I should
consider?
几千实际上相当小。基本上如果你已经在内存中为对象和一点开销留出了足够的空间,那么
字典应该没问题。
Jon
"Several thousand" is actually reasonably small. Basically if you''ve
got enough room in memory for the objects and a bit of overhead, the
dictionary should be fine.
Jon
谢谢(再次:))Jon
Thanks (again :) ) Jon
这篇关于C#DIctionary size limit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!