6 Answers
New AnswerThis is the code I tried `try { Information info = new Information (); info.Data = textboxdata1.Text; info.Data2 = textboxdata2.Text; info.Data3 = textboxdata3.Text; SaveXML.SaveData (info, "data.xml"); } catch (Exception ex) { MessageBox.Show (ex.Message); } } private void Form1_Load (object sender, EventArgs e) { if (File.Exist ("data.xml")) { XmlSerializer xs = new XmlSerializer (typeof (Information)); FileStream read = new FileStream ("data.xml, FileMode.Open, FileAccess.Read, FileShare.Read); Information info = (Information) xs.Deserialize (read); textboxData1.Text = info.Data1; textboxdata2.Text = info.Data2; textboxdata3.Text = info.Data3; ` Specifically, I want to know if you can replace the "xml" ending with a custom "abc" ending, and that it still have the same values and that it works as such. Just like here SaveXML.SaveData (info, "data.xml"); Thanks for your attention.