예제 #1
0
        public static void XmlDeserializationPaper(ref AllResearchPaper allresPaper)
        {
            //Console.WriteLine("Using Deserialization");
            XmlSerializer xsObj = new XmlSerializer(typeof(AllResearchPaper));
            FileStream    fsObj = new FileStream("AllResearchPaperInfo.xml", FileMode.Open, FileAccess.Read);

            allResPaper = xsObj.Deserialize(fsObj) as AllResearchPaper;
            fsObj.Close();
        }
예제 #2
0
        public static void XMLSerializationPaper(ref AllResearchPaper allresPaper)
        {
            //Console.WriteLine("Saving Employee Details using XML serialization");

            XmlSerializer xsObj = new XmlSerializer(typeof(AllResearchPaper));
            FileStream    fsObj = new FileStream("AllResearchPaperInfo.xml", FileMode.Create, FileAccess.Write);

            xsObj.Serialize(fsObj, allResPaper);

            fsObj.Close();
        }