GarbageGuy
GarbageGuy

Reputation: 513

Persisting/retrieving settings at runtime using .NET compact framework

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.

Upvotes: 4

Views: 1119

Answers (2)

PhilChuang
PhilChuang

Reputation: 2566

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.

Upvotes: 0

Robert Harvey
Robert Harvey

Reputation: 180878

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

Upvotes: 2

Related Questions