title: DataContract Serialization - Base class property names not working
body: <p>I have a base class like the following:</p>
  
  <pre><code>[Serializable]
  public class SerializableDomainObject&lt;T&gt;
  {
      public SerializableDomainObject()
      {
          ID = Guid.NewGuid();
      }
  
      [DataMember(Name="ID", Order = 0)]
      public Guid ID { get; private set; }
  
      public void Save()
      {
          // serialize
      }
  
      public void Load()
      {
          // deserialize
      }
  }
  </code></pre>
  
  <p>I then have lots of derived classes from this, here is an example of one:</p>
  
  <pre><code>[DataContract(Name="MyDomainObject")]
  public class MyDomainObject : SerializableDomainObject&lt;MyDomainObject&gt;
  {
      public MyDomainObject()
      {
      }
  
      public MyDomainObject(string name)
      {
          Name = name;
      }
  
      [DataMember(Order = 1)]
      public string Name { get; private set; }
  }
  </code></pre>
  
  <p>Once serialized here is the output:</p>
  
  <pre><code>&lt;MyDomainObject xmlns="http://schemas.datacontract.org/2004/07/DomainObjects" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;_x003C_ID_x003E_k__BackingField&gt;2b3c00f6-1b15-4a6b-bd6c-a1f447ea5a34&lt;/_x003C_ID_x003E_k__BackingField&gt;
      &lt;Name&gt;AName&lt;/Name&gt;
  &lt;/MyDomainObject&gt;
  </code></pre>
  
  <p><b>Why is the ID property not being serialized with the name I have provided in the DataMember attribute in the base class?</b></p>