title: Add fixed attribute to XmlElement without a wrapper class
body: <p>I have class of the following sample structure:</p>
  
  <pre><code>public class DataClass{
  
      public String Field1{ get; set; }
      public Int32 Field2{ get; set; }
      public Int32 Field3{ get; set; }
  
  }
  </code></pre>
  
  <p>I have to add a fixed attribute for every field, so that the output looks like:</p>
  
  <pre><code>&lt;DataClass&gt;
     &lt;Field1 code="code#1"&gt;Value of Field1&lt;/Field1&gt;
     &lt;Field2 code="code#2"&gt;Value of Field2&lt;/Field2&gt;
     &lt;Field3 code="code#3"&gt;Value of Field3&lt;/Field3&gt;
  &lt;/DataClass&gt;
  </code></pre>
  
  <p>Is this possible without writing a wrapper class for every Field?
  Something like:</p>
  
  <pre><code>public class DataClass{
  
      [XmlElement(FixedAttribute="code#1")]
      public String Field1{ get; set; }
  
      [XmlElement(FixedAttribute="code#2")]
      public Int32 Field2{ get; set; }
  
      [XmlElement(FixedAttribute="code#3")]
      public Int32 Field3{ get; set; }
  
  }
  </code></pre>
  
  <p>Kind Regards</p>