title: What controls XML serialization order of C# partial classes?
body: <p>As discussed in <a href="https://stackoverflow.com/questions/431203/does-the-order-of-fields-in-c-matter">Does the order of fields in C# matter?</a>, the order of serializable properties affects, among other things, XmlSerializer output.</p>
  
  <p>But if fields are in 2 files (using partial classes), does anyone know what in fact controls the resulting order?  That is, which file's properties comes first?</p>
  
  <p>(Background: I ask this because I've run into a scenario where one of the 2 files is auto-generated from xsd, and the other is manually edited.  The test output is different on developer boxes vs. our scripted build box.  Presumably this is a side effect of the several differences in the timing and history of the xsd->C# step in the 2 environments. Various ways to fix, but I'd like to understand the compilation process a little better if possible.)</p>