title: XMLSerialize and EXCLUDE the base class
body: <p>I would like to be able to XML serialize a subclass, but exclude its base class from the serialization.</p>
  
  <p>Here's my class (configured for DataObjects.NET):</p>
  
  <pre><code>[Serializable]
  [HierarchyRoot]
  public class MyClass: Entity
  {
      [Field, Key] public int Id { get; private set; }
      [Field(Length = 20)] public string Name { get; set; }
  }
  </code></pre>
  
  <p>Base class Entity cannot be serialized because it does not have a parameterless constructor. </p>
  
  <p>I won't be trying to reconstitute the object by deserializing (no Liskov issues).  I just want the data from the subclass in XML.  IXMLSerializable is not an attractive option, as my real classes are numerous and much more complex.</p>
  
  <p>Is there any way to tell XmlSerializer to ignore the base class?</p>