title: XMLAttribute not taken into account
body: <p>I'm trying to serialize an object with an attribute on the root element (which is a collection).</p>
  
  <pre><code>[XmlType("Person")]
  public class Person
  {
      public id Id { get; set; }
      public string Name { get; set; }
  }
  
  [XmlType("Persons")]
  public class Persons : Collection&lt;Person&gt;
  {
      [XmlAttribute("Nb")]
      public int Nb
          get {
              return this.Count;
          }
          set { }
      }
  }
  
  var persons = new Persons();
  var person = new Person();
  person.Id = 42;
  person.Name = "Toto";
  persons.Add(person);
  
  return persons;
  </code></pre>
  
  <p>The serialized output is the following:</p>
  
  <pre><code>&lt;Persons&gt;
      &lt;Person&gt;
          &lt;Id&gt;42&lt;/Id&gt;
          &lt;Name&gt;Toto&lt;/Name&gt;
      &lt;/Person&gt;
  &lt;/Persons&gt;
  </code></pre>
  
  <p>I'm expecting</p>
  
  <pre><code>&lt;Persons Nb="1"&gt;
      &lt;Person&gt;
          &lt;Id&gt;42&lt;/Id&gt;
          &lt;Name&gt;Toto&lt;/Name&gt;
      &lt;/Person&gt;
  &lt;/Persons&gt;
  </code></pre>
  
  <p><strong>How can I bring the <code>Nb</code> attribute in ?</strong></p>