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(); }
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(); }