.

static XML serialization class

//include the following:
using System.Xml.Serialization;

public static void Save(object StoorObject, string filename)
{
    XmlSerializer XS = new XmlSerializer(StoorObject.GetType());
    System.IO.StreamWriter SW = new System.IO.StreamWriter(filename);
    XS.Serialize(SW, StoorObject);
    SW.Close();
}

public static object Load(object StoorObject, string filename)
{
    XmlSerializer XS = new XmlSerializer(StoorObject.GetType());
    System.IO.StreamReader SW = new System.IO.StreamReader(filename);
    object o = XS.Deserialize(SW);
    SW.Close();
    return o;
}

What's your thoughts on this?

*

Protected by WP Anti Spam