title: How does WCF deserialization instantiate objects without calling a constructor?
body: <p>There is some magic going on with WCF deserialization.  How does it instantiate an instance of the data contract type without calling its constructor?</p>
  
  <p>For example, consider this data contract:</p>
  
  <pre><code>[DataContract]
  public sealed class CreateMe
  {
     [DataMember] private readonly string _name;
     [DataMember] private readonly int _age;
     private readonly bool _wasConstructorCalled;
  
     public CreateMe()
     {
        _wasConstructorCalled = true;
     }
  
     // ... other members here
  }
  </code></pre>
  
  <p>When obtaining an instance of this object via <code>DataContractSerializer</code> you will see that the field <code>_wasConstructorCalled</code> is <code>false</code>.</p>
  
  <p>So, how does WCF do this?  Is this a technique that others can use too, or is it hidden away from us?</p>