To expand on Solution #3 here: I'd like to strongly suggest:
1. you use WCF (DataContract, DataMember) to serialize and de-serialize your objects. It is full-featured, easy to use, and powerful.
The XML it produces, while "verbose," can be compressed ... in my experience ... down to at least half (often less than 25%) the size of the XML.
2. you realize that you will need to create Classes to serailze/de-serialize. One reason why is:
2.a. you cannot serialize WinForm Controls, like the CheckBox (long story there).
So, if I have five CheckBoxes on my Form, the Class will serialize might look like this:
using System.Runtime.Serialization;
using System.Windows.Forms
using System.Collections.Generic;
[DataContract]
public class SerializeForm1
{
public SerializeForm1()
{
NmToChkState = new Dictionary<string, CheckState>();
};
private Dictionary<string, CheckState> _nmToChkState;
[DataMember]
public Dictionary<string, CheckState> NmToChkState
{
set { _nmToChkState = value; }
get { return _nmToChkState; }
}
}
When I am ready to save the state of the Form, I do the right thing to insert KeyValuePairs of the name of the CheckBox (Key), and the CheckState (Value).
When I de-serialize this written-to-XML object, I then iterate over the Dictionary and do the right thing to restore the CheckState values of each CheckBox based on their Names.
There are lots of good articles, and tutorials here; start with the ones Sergey recommended in Solution #3.