title: WCF XML and Serialization with List
body: <p>I have a basic WCF service that takes some xml. Some of the xml is a list like so:</p>
  
  <pre><code>&lt;Root&gt;
      &lt;Products&gt;
          &lt;Product&gt;
              &lt;SKU&gt;1234&lt;/SKU&gt;
              &lt;Price&gt;2533&lt;/Price&gt;
              &lt;ProductName&gt;Brown Shows&lt;/ProductName&gt;
              &lt;Quantity&gt;1&lt;/Quantity&gt;
          &lt;/Product&gt;
          &lt;Product&gt;
              &lt;SKU&gt;345345&lt;/SKU&gt;
              &lt;Price&gt;2345&lt;/Price&gt;
              &lt;ProductName&gt;Red Shows&lt;/ProductName&gt;
              &lt;Quantity&gt;1&lt;/Quantity&gt;
          &lt;/Product&gt;
      &lt;/Products&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>In my class that this gets stored into I have:</p>
  
  <pre><code>[DataMember(Name = "Products", Order = 4, IsRequired = false, EmitDefaultValue = false)]
  public List&lt;Product&gt; products;
  </code></pre>
  
  <p>Then in my Product class I have the SKU, Price, ProductName, and Quantity. Other non list items in my class are being set, but it doesnt appear as if the xml is populating my list. Am I missing something?</p>
  
  <p>Heres my Product class</p>
  
  <pre><code>public class Product
  {
      [DataMember(Name = "SKU", Order = 0)]
      public string sku;
  
      // for the request
      [DataMember(Name = "Price", Order = 1, IsRequired = false, EmitDefaultValue = false)]
      public int price;
  
      [DataMember(Name = "ProductName", Order = 2, IsRequired = false, EmitDefaultValue = false)]
      public string productName;
  
      [DataMember(Name = "Quantity", Order = 3, IsRequired = false, EmitDefaultValue = false)]
      public int quantity;
  
      // for the response
      [DataMember(Name = "Available", Order = 1, IsRequired = false, EmitDefaultValue = false)]
      public string available;
  }
  </code></pre>