Ejemplo n.º 1
0
 public static string Serialize(MaterialList mats)
 {
     StringWriter sw = new StringWriter();
     XmlSerializer ser = new XmlSerializer(typeof(MaterialList));
     ser.Serialize(sw, mats);
     return sw.ToString();
 }
Ejemplo n.º 2
0
        public static string Serialize(MaterialList mats)
        {
            StringWriter  sw  = new StringWriter();
            XmlSerializer ser = new XmlSerializer(typeof(MaterialList));

            ser.Serialize(sw, mats);
            return(sw.ToString());
        }
Ejemplo n.º 3
0
        public static MaterialList Deserialize(string s)
        {
            StringReader  sr   = new StringReader(s);
            XmlSerializer ser  = new XmlSerializer(typeof(MaterialList));
            MaterialList  mats = (MaterialList)ser.Deserialize(sr);

            sr.Close();
            return(mats);
        }