title: XML serialization of list
body: <p>I am serializing an object to XML.  I have something like this:</p>
  
  <pre><code>Class A
  {
     public string propertyA1  { get; set; }
     public List&lt;B&gt; bList { get; set; }
  }
  
  Class B
  {
     public string num {get; set;}
     public string propertyB1  { get; set; }
  }
  </code></pre>
  
  <p>When I serialize it to XML, I want it to look like this:</p>
  
  <pre><code>&lt;A&gt;
    &lt;propertyA1&gt;someVal&lt;/propertyA1&gt; 
    &lt;B num=1&gt;
       &lt;propertyB1&gt;someVal&lt;/propertyB1&gt; 
    &lt;/B&gt;
    &lt;B num=2&gt;
       &lt;propertyB1&gt;someVal&lt;/propertyB1&gt; 
    &lt;/B&gt;
  &lt;/A&gt;
  </code></pre>
  
  <p>But, instead it looks like this:</p>
  
  <pre><code>&lt;A&gt;
    &lt;propertyA1&gt;someVal&lt;/propertyA1&gt; 
    &lt;bList&gt;
       &lt;B num=1&gt;
          &lt;propertyB1&gt;someVal&lt;/propertyB1&gt; 
       &lt;/B&gt;
       &lt;B num=2&gt;
          &lt;propertyB1&gt;someVal&lt;/propertyB1&gt; 
       &lt;/B&gt;
    &lt;/bList&gt;
  &lt;/A&gt;
  </code></pre>
  
  <p>Any idea how to get rid of the <strong>bList</strong> in the output?  I can provide more sample code if needed</p>
  
  <p>Thanks,
  Scott</p>