title: .NET Xml Serialization: Integer Element with Attribute?
body: <p>Is it possible to achieve the following in c#...</p>
  
  <p>for the class below...</p>
  
  <pre><code>public class Foo{
   public int BarId{get;set;}
   public string BarString{get;set;}
  }
  </code></pre>
  
  <p>I want to achieve the following XML:</p>
  
  <pre><code>&lt;Foo&gt;
    &lt;BarId BarString="something"&gt;123&lt;/BarId&gt;
  &lt;/Foo&gt;
  </code></pre>