Ejemplo n.º 1
0
        public static void WriteXML(RemoteControlConfigModel model)
        {
            XmlSerializer writer = new XmlSerializer(typeof(RemoteControlConfigModel));

            FileStream file = File.Create(path);

            writer.Serialize(file, model);
            file.Close();
        }
Ejemplo n.º 2
0
        public static RemoteControlConfigModel ReadXML()
        {
            XmlSerializer reader = new XmlSerializer(typeof(RemoteControlConfigModel));

            StreamReader file = new StreamReader(path);

            RemoteControlConfigModel deserialized = (RemoteControlConfigModel)reader.Deserialize(file);

            file.Close();
            return(deserialized);
        }