title: How to add value between tags using XElement?
body: <p>I have looked a bunch of XML samples using <code>XDocument</code> and <code>XElement</code> but they all seem to have self closing tags like <code>&lt;To Name="John Smith"/&gt;</code>. I need to do the following:</p>
  
  <pre><code>&lt;To Type="C"&gt;John Smith&lt;/To&gt;
  </code></pre>
  
  <p>I thought the following would work and tried to look at the object model of the Linq.XML class, but I'm off just a tad (<strong>see line below that is not working</strong>)</p>
  
  <pre><code>new XElement("To", new XAttribute("Type", "C")).SetValue("John Smith")
  </code></pre>
  
  <p>Any assistance on how to get the XML formed properly is appreciated, thanks!</p>