G
Guest
In the following snippet if an error occurs after XmLTextWriter is
instantiated I will lose the content of my Xml file!
// validation ...
// writing data into dataset
dataSet.AcceptChanges();
XmlTextWriter xmlWriter = new XmlTextWriter("myFile.xml", Encoding.UTF8);
throw new Exception("say an error occured here");
dataSet.WriteXml(xmlWriter);
How can I prevent this?
Thank you.
instantiated I will lose the content of my Xml file!
// validation ...
// writing data into dataset
dataSet.AcceptChanges();
XmlTextWriter xmlWriter = new XmlTextWriter("myFile.xml", Encoding.UTF8);
throw new Exception("say an error occured here");
dataSet.WriteXml(xmlWriter);
How can I prevent this?
Thank you.