View Single Post
  #2 (permalink)  
Old April 8th, 2007, 10:19 PM
planoie's Avatar
planoie planoie is offline
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I typically use object serialization to deal with config settings (whether they are readonly or read/write). Fortunately, the .NET framework provides some very easy methods for serializing and deserializing objects to and from XML. You can create a class that holds your settings (single global settings as well as setting collections/lists, such as your program list). Then you just serialize an instance of the class to disk. You don't have to write any code that processes XML directly, just let the framework do it.

Take a look at the XmlSerializer class to get an idea of where to start:

http://msdn2.microsoft.com/en-us/lib...erializer.aspx

-Peter