title: CollectionDataContract serialization not adding custom properties (DataMember)
body: <p>We have a legacy system that needs to be fed (XML) data in a most unstructured format. Is the following even possible with the .NET <code>DataContractSerializer</code>?</p>
  
  <p>Given the following DataContracts</p>
  
  <pre><code>[CollectionDataContract(Name = "Options", ItemName = "Option")]
  public class OptionItemCollection : List&lt;OptionItem&gt;
  {
      [DataMember(Name = "Name")]
      public string Name { get; set; }
  
      public OptionItemCollection()
      {
      }
  
      public OptionItemCollection(IEnumerable&lt;OptionItem&gt; items) : base(items)
      {
      }
  }
  
  [DataContract(Name = "Option")]
  public class OptionItem
  {
      [DataMember]
      public string Text { get; set; }
      [DataMember]
      public string Value { get; set; }
  
  }
  </code></pre>
  
  <p>Is it possible to serialize this collection directly into the following XML representation:</p>
  
  <pre><code>&lt;Options&gt;
      &lt;Name&gt;Juices&lt;/Name&gt;
      &lt;Option Value="1"&gt;Orange Juice&lt;/Option&gt;
      &lt;Option Value="2"&gt;Pineapple&lt;/Option&gt;
      &lt;Option Value="3"&gt;Fruit Punch&lt;/Option&gt;
  &lt;/Options&gt;
  </code></pre>
  
  <p><strong>NOTE:</strong> 
  This is exactly how the legacy system expects the data to be submitted.</p>
  
  <p>Or Even:</p>
  
  <pre><code>&lt;Options&gt;
      &lt;Name&gt;Juices&lt;/Name&gt;
      &lt;Option&gt;&lt;Value&gt;1&lt;/Value&gt;&lt;Text&gt;Orange Juice&lt;/Text&gt;&lt;/Option&gt;
      &lt;Option&gt;&lt;Value&gt;2&lt;/Value&gt;&lt;Text&gt;Pineapple&lt;/Text&gt;&lt;/Option&gt;
      &lt;Option&gt;&lt;Value&gt;3&lt;/Value&gt;&lt;Text&gt;Fruit Punch&lt;/Text&gt;&lt;/Option&gt;
  &lt;/Options&gt;
  </code></pre>
  
  <p><strong>Also NOTE</strong> that the emphasis is on the <strong>Name</strong> and <strong>Option</strong> element residing within the <strong>Options</strong> element.</p>