Step 1 Develop UI as per requirement like Name, Branch, Address, Pin Code, Mobile No
Add namespaces
Using System.Xml;
Using System.Xml.Linq;
Add this code at Button click
String path = System.IO.Path.GetDirectoryName (System.Reflection.Assembly.GetExecutingAssembly().Location);
StringWriter stringwriter = new StringWriter();
XmlTextWriter xmlTextWriter = new XmlTextWriter(stringwriter);
xmlTextWriter.Formatting = Formatting.Indented;
xmlTextWriter.WriteStartDocument();
xmlTextWriter.WriteStartElement("root");
xmlTextWriter.WriteElementString("Name ", "" + Name + "");
xmlTextWriter.WriteElementString("Branch ", "" + Branch + "");
xmlTextWriter.WriteElementString("Address ", "" + Address + "");
xmlTextWriter.WriteElementString("Mobile No ", "" + Mobile No + "");
xmlTextWriter.WriteElementString("Pin code ", "" + Pin code + "");
xmlTextWriter.WriteEndElement();
xmlTextWriter.WriteEndDocument();
XmlDocument docSave = new XmlDocument();
docSave.LoadXml(stringwriter.ToString());
string xml = stringwriter.ToString();
docSave.Save(path + @"\conXml.xml");
Then read Xml from stored Location
String path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
XDocument doc = XDocument.Load(@"conXml.xml");
if (doc != null)
{
String name = doc.Root.Element("name ").Value;
String Branch = doc.Root.Element("Branch ").Value;
String Address = doc.Root.Element("Address ").Value;
String Mobile No = doc.Root.Element("Mobile No ").Value;
String Pin code = doc.Root.Element("Pin code ").Value;
}