商店字典<字符串,字符串>在应用程序设置字符串、字典、应用程序、商店

2023-09-07 01:41:23 作者:花静幽然﹏

我有,我希望用户能够从添加/删除的信息,然后保存为他们,因此他们可以访问它的下一个时间字符串的字典程序重新启动

I have a dictionary of strings that i want the user to be able to add/remove info from then store it for them so it they can access it the next time the program restarts

我不清楚我怎么可以存储一个字典作为一个设置。我看到,在system.collections.special有一种叫做stringdictionary的事情,但香港专业教育学院读的SD已经过时,不应使用。

I am unclear on how i can store a dictionary as a setting. I see that under system.collections.special there is a thing called a stringdictionary but ive read that SD are outdated and shouldn't be used.

也是今后我可能需要存储的字典,这些不仅是字符串(INT字符串)

also in the future i may have need to store a dictionary that is not strings only (int string)

你会怎么保存一本字典在设置文件为.NET应用程序?

how would you store a dictionary in the settings file for a .net application?

推荐答案

最简单的回答是使用一排及放大器;列分隔符为你的字典转换为一个字符串。然后你只需要存储1字符串中的设置文件。

The simplest answer would be to use a row & column delimiter to convert your dictionary to a single string. Then you just need to store 1 string in the settings file.