I Want to raise an event to prevent any modification on the Xml file.
Simply raising an event is enough ? like
XElement doc = XElement.Load(@"d:\XMLFiles\namespace.xml");
doc.Changed +=new EventHandler<XObjectChangeEventArgs>(doc_Changed);
What is the code do i need to write inside doc_changed(..,...)
to rollback any modifications?
static void doc_Changed(object sender, XObjectChangeEventArgs e)
{
//what is the code needed here..?
}