title: Specifying the order of XmlAttribute when saving an XmlDocument
body: <p>I want to be able to specify the order of the attributes.</p>
  
  <p>Take the below code. </p>
  
  <pre><code>XmlDocument doc = new XmlDocument();
  XmlElement element = doc.CreateElement("Test");
  XmlElement subelement = doc.CreateElement("SubTest");
  XmlAttribute att1 = doc.CreateAttribute("Value1");
  XmlAttribute att2 = doc.CreateAttribute("Value2");     
  subelement.Attributes.Append(att1);
  subelement.Attributes.Append(att2);
  element.AppendChild(subelement);
  doc.AppendChild(element);
  doc.Save("C:\\Test.xml");
  </code></pre>
  
  <p>Creates this:</p>
  
  <pre><code>&lt;Test&gt;
    &lt;SubTest Value1="" Value2="" /&gt;
  &lt;/Test&gt;
  </code></pre>
  
  <p>Is there some way for me to dictate that Value2 is always first and Value1 is always second apart from the order they are added to the XmlDocument?</p>
  
  <p>I know this doesnt matter when is comes to a valid XML document, but i would like to accomplish this for ease of reading by a human. </p>