To create XML file.

Gopesh9
Posted by Gopesh9 under ASP.NET category on | Points: 40 | Views : 916
XElement xml = new XElement("contacts", new XElement("contact", new XAttribute("contactId", "1"), new XElement("firstName", "Barry"), new XElement("lastName", "Gottshall")),
new XElement("contact", new XAttribute("contactId", "2"), new XElement("firstName", "Armando"), new XElement("lastName", "Valdes")));

Console.WriteLine(xml);
Console.ReadLine();

Comments or Responses

Login to post response