SQLite is not included with .NET2, but you could ship it with your application
The built-in settings system works fine for simple apps - you do need to add a couple of lines of boilerplate to deal with version changes but it's not complicated.
There is a lot of 'it depends' about your question, as you don't say how much of what types of data you need to store, nor if you have any other reasons to care where it goes.
发布评论
评论(2)
您可以将 xml 文件放在这里:
环境.GetFolderPath(
Environment.SpecialFolder.LocalApplicationData)
您的问题有很多“这取决于”,因为您没有说明需要存储多少类型的数据,也没有说明您是否有任何其他原因关心它的去向。
You could put your xml file here:
Environment.GetFolderPath(
Environment.SpecialFolder.LocalApplicationData)
There is a lot of 'it depends' about your question, as you don't say how much of what types of data you need to store, nor if you have any other reasons to care where it goes.
将用户应用程序设置存储在独立存储中似乎是最佳实践。
http://msdn.microsoft。 com/en-us/library/system.io.isolatedstorage(v=vs.80).aspx
将设置存储为 xml 文件是完全可以的。
Storing user application settings in isolated storage seems to be a best practice.
http://msdn.microsoft.com/en-us/library/system.io.isolatedstorage(v=vs.80).aspx
Storing settings as an xml file is perfectly fine.