title: Renaming of class property that is marked with a DataMemberAttribute
body: <p>Actually i have a class like this</p>
  
  <pre><code>[DataContract]
  public class Item : IExtensibleDataObject
  {
      [Browsable(false)]
      public virtual ExtensionDataObject ExtensionData { get; set; }
  
      [DataMember]
      public string ID { get; set; }
  
      [DataMember]
      public string Name { get; set; }
  
      public Item()
          : this(String.Empty, String.Empty)
      { }
  
      public Item(string id, string name)
      {
          ID = id ?? String.Empty;
          Name = name ?? String.Empty;
      }
  }
  </code></pre>
  
  <p>You can easily serialize and deserialize it. But now comes the hard part:</p>
  
  <p>I have to rename the property <code>Name</code> to <code>FullName</code> and every new xml serialized file should come out with the <code>FullName</code> while it is still possible to read in the old files.</p>
  
  <p>To get the new property name out into a new file is quite easy. Just rename the property and you're done.</p>
  
  <p>For compatibility i would mark the new property name with <code>[DataMember(Name="Name")]</code> but in this case if i write this class back into a file i got the old name written.</p>
  
  <p>So exists there something in the <code>DataContract</code> where i can mark my property <code>FullName</code> maybe twice like</p>
  
  <pre><code>[DataMember(Name="Name")]
  [DataMember]
  public string FullName { get; set}
  </code></pre>
  
  <p>or is there any other mechanism how i can show that both values can be written into this, but only one will come out on writing back?</p>
  
  <p>The only way i can imagine of would be to create a class <code>LegacyItem</code> which has no functions or something like this, but fulfills the old <code>DataContract</code>. Additionally some kind of implicit/explicit operator to convert my <code>LegacyItem</code> into an <code>Item</code>. Last but not least on deserializing i have to make some tests (maybe just a simple <code>try/catch</code>) to find out what class i should tell the <code>DataContractSerializer</code> to read in the file.</p>
  
  <p>So even if this approach would be possible it sounds a little bit overcomplicated for this task and i'm wondering if there isn't something already available within the framework that would make this task a little bit easier.</p>