title: Export application settings to XML
body: <p>Following situation:</p>
  
  <p>I have some values saved into my application settings (Properties.Settings)
  In this settings i have also saved some objects, where the properties of this objects are stored.</p>
  
  <p>Now i want to implement a function to export my settings into a xml file.</p>
  
  <p>for integer values and strings i did it this way:</p>
  
  <pre><code>XmlWriter writer = XmlWriter.Create(path, settings);
  writer.WriteStartDocument();
  writer.WriteElementString("ServerIP", Settings.Default.ServerIP);
  writer.WriteElementString("ServerPort", Settings.Default.ServerPort.ToString());
  writer.WriteEndDocument();
  writer.Flush();
  writer.Close();
  </code></pre>
  
  <p>Ok.. i hope this is the correct way until now.</p>
  
  <p>Now i need to store my objects into this file.</p>
  
  <p>My idea was to use the <strong>XmlSerializer</strong> class. 
  But unfortunately i have absolutely no clue how to use it to get the objects combined with the other values in one XML file</p>
  
  <p>in addition here is the code of the class the i want to write to the XML file: 
  <a href="http://pastebin.com/PmB4tM7b" rel="nofollow">http://pastebin.com/PmB4tM7b</a></p>