title: C# initialize object
body: <p>The first 3 lines of code works fine..</p>
  
  <p>How can I do the same when using <a href="http://msdn.microsoft.com/en-us/library/bb384062.aspx" rel="nofollow">object initializer</a> ?</p>
  
  <pre><code>// works
  Customer MyCustomerx = new Customer();
  MyCustomerx.Location[0].place = "New York";
  MyCustomerx.Location[1].place = "France";
  
  // problem here
  List&lt;Customer&gt; MyCustomer = new List&lt;Customer&gt;
  {
   new Customer() { Name= "Me",Location[0].place = "New York" }
  }
  </code></pre>