title: XmlSerialization - Add a comment
body: <p>I'm using <strong>XmlSerializer to serialize and de-serialize</strong> my xml files.</p>
  
  <p>But is there a way to <strong>add a comment</strong>. I cant find it.</p>
  
  <p>Something like this is what I have tried.</p>
  
  <pre><code>    [XmlElement("Name")]
      [XmlComment("This is the name property")]
      public String Name
      {
          get { return this._name; }
          set { this._name = value; }
  
      }
  </code></pre>
  
  <p>This is the code that serializes the Xml</p>
  
  <pre><code>var serializer = new XmlSerializer(typeof(SomeObject));
  
  using (var writer = new StreamWriter(@"c:\path\to\file.xml"))
  {
       serializer.Serialize(writer, scene);
  }
  </code></pre>
  
  <p>There for hoping to get the output of</p>
  
  <pre><code>&lt;SomeObject&gt;
     &lt;!-- This is the name property --&gt;
     &lt;Name&gt;My Name is John&lt;/Name&gt;
  &lt;/SomeObject&gt;
  </code></pre>
  
  <p>Ive looked everywhere. Its probably not available.</p>