by pietman
6. February 2010 14:13
//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;
}
ab9c595f-5435-46ab-8eb9-45a69a8f46df|0|.0
Tags: