title: Most current implementation methods for serializing objects in .NET (as of v4.0)
body: <p>I have an simple custom object called <code>MyObject</code> (a couple of basic properties and a <code>List(of MyObject)</code>, so it's recursive) that I need to serialize for storage. I'm not sure if I'll serialize to XML or Binary yet, but I want to make sure I'm using the most up-to-date methods for doing it, as there are a few different namespaces involved and I might be missing something.</p>
  
  <ul>
  <li>To do XML, I'd use <code>System.Xml.Serialization.XmlSerializer</code></li>
  <li>To do binary, I'd use <code>System.Runtime.Serialization.Formatters.Binary.BinaryFormatter</code></li>
  </ul>
  
  <p>There's also a <code>System.Runtime.Serialization.Formatters.Soap.SoapFormatter</code>, but MSDN claims it's depreciated in favor of BinaryFormatter. I would have expected everything to be in the second namespace above - is there a newer version of the XmlSerializer that I should be using?</p>