Exemplo n.º 1
0
        public void SerializeCollection(string filename, ObjCollector <O> OCollection)
        {
            XmlSerializer xmlSerial = new XmlSerializer(typeof(ObjCollector <O>));
            TextWriter    writer    = new StreamWriter(filename);

            xmlSerial.Serialize(writer, OCollection);
        }
Exemplo n.º 2
0
        public ObjCollector <O> DeserializeCollection(string filename, ObjCollector <O> OCollection)
        {
            XmlSerializer xmlSerial = new XmlSerializer(typeof(ObjCollector <O>));
            TextReader    reader    = new StreamReader(filename);

            OCollection = (ObjCollector <O>)xmlSerial.Deserialize(reader);
            return(OCollection);
        }