title: Unexpected output of xsd.exe
body: <p>Consider the following simple schema:</p>
  
  <p><a href="https://i.stack.imgur.com/DoP8U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DoP8U.png" alt="XSD schema"></a></p>
  
  <pre><code>&lt;xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
      &lt;xs:element name="MyRoot"&gt;
          &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                  &lt;xs:group ref="MyChoice" minOccurs="0" maxOccurs="unbounded"/&gt;
              &lt;/xs:sequence&gt;
          &lt;/xs:complexType&gt;
      &lt;/xs:element&gt;
      &lt;xs:group name="MyChoice"&gt;
          &lt;xs:choice&gt;
              &lt;xs:element name="a" type="xs:string"/&gt;
              &lt;xs:element name="b" type="xs:string"/&gt;
              &lt;xs:element name="c" type="xs:string"/&gt;
          &lt;/xs:choice&gt;
      &lt;/xs:group&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>When turning this into C# code with xsd.exe (VS2017), I get the following output:</p>
  
  <pre><code>public partial class MyRoot {
  
      private string[] aField;
  
      private string[] bField;
  
      private string[] cField;
  
      // ... omitted for brevity ...
  }
  </code></pre>
  
  <p>This code has a major problem: in the XSD/XML all of the sub-elements (a, b and c) were <strong>ordered</strong>.
  This order is now <strong>lost</strong> in the C# class, since there are three different arrays for each of the sub elements.</p>
  
  <p>Is xsd.exe doing it wrong? Or am I using it wrong? Or is the .xsd file flawed?</p>