title: InvalidOperationException When XML Serializing Inherited Class
body: <p>I am having an issue serializing a c# class to an XML file that has a base class... here is a simple example:</p>
  
  <pre><code>namespace Domain
  {
     [Serializable]
     public class ClassA
     {
        public virtual int MyProperty
        {
           get; set;
        }
     }
  }
  
  namespace Derived
  {
     public class ClassA : Domain.ClassA
     {
        public override int MyProperty
        {
           get { return 1; } set { /* Do Nothing */ }
        }
     }
  }
  </code></pre>
  
  <p>When I attempt to serialize an instance of Derived.ClassA, I receive the following exception:</p>
  
  <p>InvalidOperationException(Types 'Domain.ClassA' and 'Derived.ClassA' both use the XML type name 'ClassA', from the namespace ". Use XML attributes to specify a unique XML name and/or namespace for the type.)</p>
  
  <p>The problem is that I want to create a single base class that simply defines the structure of the XML file, and then allow anyone else to derive from that class to insert business rules, but that the formatting will come through from the base.</p>
  
  <p>Is this possible, and if so, how do I attribute the base class to allow this?</p>