title: Serialize Generic type over WCF Service
body: <p>I have a C# class defined as follows:</p>
  
  <pre><code>public class GenericItem&lt;T&gt;
  {
    public List&lt;T&gt; Items { get; set; }
  
    public DateTime TimeStamp { get; set; }
  } 
  </code></pre>
  
  <p>I am creating an instance of this class on my server. I am then trying to pass it over the wire via a WCF service as shown here:</p>
  
  <pre><code>[OperationContract]
  public GenericItem&lt;MyCustomType&gt; GetResult()
  {
    GenericItem&lt;MyCustomType&gt; result = BuildGenericItem();
    return result;
  }
  </code></pre>
  
  <p>Everything compiles just fine at this point. When I "update service reference" in my Silverlight app an re-compile, I receive a compile-time error, similar to the following:</p>
  
  <p><em>MyNamespace.GenericItemOfMyCustomType[extra chars] does not contain a public definition for 'GetEnumerator'</em></p>
  
  <p>I have no idea why:</p>
  
  <ol>
  <li>Extra chars are appearing. The seem to change everytime I update the service reference.</li>
  <li>How to actually fix this.</li>
  </ol>
  
  <p>What am I doing wrong?</p>