title: attribute not being serialized by XmlSerializer
body: <p>I'd like to serialize a class to XML, assigning an XML attribute to it. Snippet:</p>
  
  <pre><code>    [XmlType(TypeName = "classmy")]
      public class MyClass2 : List&lt;object&gt;
      {
          [XmlAttribute(AttributeName = "myattr")]
          public string Name { get; set; }
      }
  
      public class MyConst
      {
          public MyConst()
          {
              MyClass2 myClass2 = new MyClass2 { 10, "abc" };
  
              myClass2.Name = "nomm";
  
              XmlSerializer serializer = new XmlSerializer(typeof(MyClass2));
              serializer.Serialize(Console.Out, myClass2);
          }
      }
  </code></pre>
  
  <p>But the resulting XML looks like this</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="IBM437"?&gt;
  &lt;classmy xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;anyType xsi:type="xsd:int"&gt;10&lt;/anyType&gt;
    &lt;anyType xsi:type="xsd:string"&gt;abc&lt;/anyType&gt;
  &lt;/classmy&gt;
  </code></pre>
  
  <p>All well and good, with the only exception being that myClass2.Name is not serialized. I was expecting something in the line of</p>
  
  <pre><code>&lt;classmy myattr="nomm" [...]&gt;[...]&lt;/classmy&gt;
  </code></pre>
  
  <p>... Why isn't that serialized, and how can it be?</p>