title: Databinding in windows forms on an object graph with possible null properties?
body: <p>If I have an object graph like this:</p>
  
  <pre><code>class Company {
    public Address MainAddress {...}
  }
  
  class Address {
    public string City { ... }
  }
  
  Company c = new Company();
  c.MainAddress = new Address();
  c.MainAddress.City = "Stockholm";
  </code></pre>
  
  <p>and databind to a control using:</p>
  
  <pre><code>textBox1.DataBinding.Add( "Text", c, "MainAddress.City" );
  </code></pre>
  
  <p>Everything is fine, but If I bind to:</p>
  
  <pre><code>Company c2 = new Company();
  </code></pre>
  
  <p><code>c2</code> using the same syntax it crashes since the <code>MainAddress</code> property is null. I wonder if there is a custom Binding class that can set up listeners for all the possible paths here and bind to the actual object dynamically when/if I sometime later in the application set the <code>MainAddress</code> property.</p>