title: WCF call fails when serialize base class which is a generic List<>
body: <p>I have the following structure:</p>
  
  <pre><code>public class DerivedClass : List&lt;BaseClass&gt;
  {
     //Some helper methods used against the List of BaseClass properties
  
     //Methods
     public  List&lt;BaseClass&gt; GetListOfBaseClasses()
     {
         return (List&lt;BaseClass&gt;)this;
     }
  }
  </code></pre>
  
  <p>My WCF service knows about the BaseClass object, but the client derived it as a generic list, now when I try to call the service, like this:</p>
  
  <pre><code>DerivedClass classD;
  FillData(classD)
  List&lt;BaseClass&gt; baseClassList = classD.GetListOfBaseClasses();
  
  using (IService myService = ObjectFactory.GetMyService())
  {
        myService.DoSomething(baseClassList); //Method is expecting "List&lt;BaseClass&gt;"
  }
  </code></pre>
  
  <p>I get the following exception:</p>
  
  <blockquote>
    <p>Type 'DerivedClass' with data contract name '[some URI text]' is not
    expected. Consider using a DataContractResolver or add any types not
    known statically to the list of known types - for example, by using
    the KnownTypeAttribute attribute or by adding them to the list of
    known types passed to DataContractSerializer.</p>
  </blockquote>
  
  <p>I tried adding these attributes to my class in various combinations but still no luck:</p>
  
  <pre><code>[Serializable]
  [KnownType(typeof(List&lt;BaseClass&gt;))]
  [XmlInclude(typeof(List&lt;BaseClass&gt;))]
  [KnownType(typeof(BaseClass))]
  [XmlInclude(typeof(BaseClass))]
  public class DerivedClass : List&lt;BaseClass&gt;
  {
    /// ...
  }
  </code></pre>
  
  <p>PS- Sheehs, am I the only one that thinks the entry fields are funky on this site? Things keep moving around as I try to format... :|  great site regardless of my inability to get the idea of entering text as I want. </p>