我正在访问服务器并获取一些数据,然后解析这些数据并将其存储在一个
我将这个
代码示例:
Dictionary<TKey, TValue>
中。我将这个
Dictionary<TKey, TValue>
列表存储在隔离存储中。现在的问题是,在第二次运行时,当我尝试检索Dictionary<TKey, TValue>
时(即使在第一次运行时已经存储了值),bean中每个键的值都变成了null。我不知道我存储Dictionary<TKey, TValue>
的方式是否有误。代码示例:
CacheManager.getInstance().PersistData(CacheManager.SERVICE_TABLE,
dictionaryList);
public void PersistData(string storageName, object dict)
{
try
{
PersistDataStore.Add(storageName, dict);
PersistDataStore.Save();
}
catch (Exception ex)
{
}
}