当OrderedDictionary、ListDictionary和HybridDictionary这三种不同的字典都执行相似的功能时,它们需要什么?它们都不是排序的,集合中的元素都可以通过键来检索。那么,三个不同类的目的是什么? 最佳答案 简而言之:Dictionary-嗯,字典。ListDictionary-用于小型集合,通常少于10件HybridDictionary-在集合大小未知时使用(根据集合大小切换实现)OrderedDictionary-与SortedDictionary的元素不同,OrderedDictionary的
我正在查看.Net框架的MSDN中的Collection类。我遇到了HybridDictionary,它指出(http://msdn.microsoft.com/en-us/library/system.collections.specialized.hybriddictionary.aspx):ImplementsIDictionarybyusingaListDictionarywhilethecollectionissmall,andthenswitchingtoaHashtablewhenthecollectiongetslarge.所以我想知道ListDictionary里面写
我正在查看.Net框架的MSDN中的Collection类。我遇到了HybridDictionary,它指出(http://msdn.microsoft.com/en-us/library/system.collections.specialized.hybriddictionary.aspx):ImplementsIDictionarybyusingaListDictionarywhilethecollectionissmall,andthenswitchingtoaHashtablewhenthecollectiongetslarge.所以我想知道ListDictionary里面写