Recording
Serializing from class to XML file
list<common.browserversion> List = new list<common.browserversion> ();
for (int i = 0; i < i++)
{
common.browserversion mm = new common.browserversion ();
Mm. Name = i.ToString ();
Mm. Remark = i.ToString ();
List. ADD (mm);
}
System.Xml.Serialization.XmlSerializer s = new System.Xml.Serialization.XmlSerializer (typeof (list< common.browserversion>));
using (System.IO.FileStream fs = new System.IO.FileStream (@ "H:\aa.xml", System.IO.FileMode.Create, System.IO.FileAccess.Write))
{
s.serialize (FS, list);
}
Deserializes from an XML file into a class
using (System.IO.StringReader RDR = new System.IO.StringReader (Common.Util.ReadData (@) H:\aa.xml ))
{
System.Xml.Serialization.XmlSerializer d = new System.Xml.Serialization.XmlSerializer (typeof) (List <Common.BrowserVersion>));
List<common.browserversion> BVM = (list<common.browserversion>) d.deserialize (RDR);
}