views:

324

answers:

2

I want to save/restore my settings of my Windows Mobile application in runtime. The amount of data is insignificant, using database is an overkill.

What would be the best practice for a task like that? I thought of something similar as Settings : ApplicationSettingsBase class in .NET full framework, but it is not supported in the compact version.

+1  A: 

This fellow wrote an implementation of AppSettings for Compact Framework: http://www.codeproject.com/KB/mobile/SaveSettings.aspx

Robert Harvey
A: 

If the structure of your settings class isn't too fancy, you could use XmlSerializer.

The major shortcomings of XmlSerializer is that it can't handle property types that are abstract, interfaces, or generic.

ZaijiaN