我有一本按降序排列的字典。每個字符串(鍵)是一個術語,int(值)是它的數量。我如何得到第一個計數?因爲它指的是最大計數(頻率).......提前致謝。在字典中的第一個項目
Just to inform some of whom commented that the dictionary<string,int> will change its
rank. Be sure, if you are grouping the dictionary by its count, there is no problem
with the order . Always the dictionary will come with highest count at first.
'dict.First()'?! http://stackoverflow.com/a/436957/284240您可能想要使用['OrderedDictionary'](http://msdn.microsoft.com/zh-cn/library/system.collections.specialized.ordereddictionary.aspx )而不是 –
字典是散列表。他們沒有排序。向我們展示一些代碼。 – Steven
@Tim Schmelter你是說Dict.value ....對嗎? – FSm