title: WCF Disable Deserialization Order Sensitivity
body: <p>I have a recurring problem when passing Serialized objects between non-.NET Clients, and .NET WCF Services. </p>
  
  <p>When WCF Deserializes objects, it is strictly dependant upon the order of properties. </p>
  
  <p>That is, if I define my class as: </p>
  
  <pre><code>public class Foo 
  { 
    public int ID { get; set; } 
    public int Bar { get; set; } 
  } 
  </code></pre>
  
  <p>Then WCF Will serialize the object as as: </p>
  
  <pre><code>&lt;Foo&gt;
    &lt;Bar&gt;123&lt;/Bar&gt;
    &lt;ID&gt;456&lt;/ID&gt;
  &lt;/Foo&gt;
  </code></pre>
  
  <p>Note: The properties are serialized in alphabetical order. </p>
  
  <p>If you attempt to Deserialize an object which has the positions of <code>Bar</code> and <code>ID</code> swapped, WCF will treat the incorrectly positioned elements as null. </p>
  
  <p>Whilst I know I can use the <code>DataMember</code> attribute, and force a specific ordering, I want to reduce the number of times I have to debug issues where fields are 'mysteriously' null. </p>
  
  <p>So, my question is: Can you tell the WCF Deserializer to ignore the order of fields, when deserializing objects. </p>