【发布时间】:2013-12-26 13:00:31
【问题描述】:
我有一个字符串列表。
我想删除其中的一个,如下所示:
settings.RecentSearches.Keys.Remove(itemToAdd.Key);
settings.RecentSearches.Keys.Add(itemToAdd.Key);
错误:
Mutating a key collection derived from a dictionary is not allowed.
我想在其中添加和删除值。
我能做什么?
【问题讨论】:
-
RecentSearches 属性的类型是什么?
-
@SergeyLitvinov public MruDictionary
最近搜索; -
@NahumLitvin no...not