title: How to serialize collections in .net
body: <p>I want to serialize a collection of objects for storage/retrieval from my app.config file. (I'm using the code from an example from Jeff Attwood's blog entry <a href="http://www.codinghorror.com/blog/archives/000656.html" rel="nofollow noreferrer">The Last Configuration Section Handler.. Revisited</a>).</p>
  
  <p>What I want to know, is why collections of objects of type </p>
  
  <pre><code>public class MyClass
  {
    ...
  }
  </code></pre>
  
  <p>get serialized to an xml element called</p>
  
  <pre><code>&lt;ArrayOfMyClass&gt;...&lt;/ArrayOfMyClass&gt; 
  </code></pre>
  
  <p>In this example I'm using a generic list of MyClass objects. I've also tried creating a new class which inherits from List and the resultant xml is exactly the same.</p>
  
  <p>Is there a way to override the xml element name used when serializing/deserializing?</p>