XML : c# 2 Parameters save in xml

i want to save an ID (integer) and an String in one XML Document. How can i do this with c# code?

I know it for one object , but i have no idea how to do it for 2.

Here my code for one object:

private void button2_Click(object sender, EventArgs e) { XDocument ReleasesXML;

          if (File.Exists(id + ".xml"))          {              ReleasesXML = XDocument.Load(id + ".xml");          }          else          {              File.Copy("SourcefileReleases.Xml", id + ".xml");              ReleasesXML = XDocument.Load(id + ".xml");          }    

Thanks ;)

No comments:

Post a Comment