title: How do you use XMLSerialize for Enum typed properties in c#?
body: <p>I have a simple enum:</p>
  
  <pre><code>enum simple 
  { 
    one, 
    two, 
    three 
  };
  </code></pre>
  
  <p>I also have a class that has a property of type <code>simple</code>. I tried decorating it with the attribute: <code>[XmlAttribute(DataType = "int")]</code>. However, it fails when I try to serialize it using an <code>XmlWriter</code>.</p>
  
  <p>What is the proper way to do this? Do I have to mark the enum itself as well as the property, and if so, with which data type?</p>