title: Assign values to inner class object
body: <p>I have a class like below</p>
  
  <pre><code>public class HintQuestion
  {
      public string QuestionCode { get; set; }
      public string QuestionName { get; set; }
  }
  </code></pre>
  
  <p>and another calss like below</p>
  
  <pre><code>public class User
  {
      public User()
      {
          HintQuestion = new HintQuestion();
      }
      public HintQuestion HintQuestion { get; set; }
  }
  </code></pre>
  
  <p>The problem is when I create an instance of <code>User</code> calss and assign values to inner class object it is not working. I am using object initialize</p>
  
  <pre><code>User u=new user{HintQuestion.QuestionCode  ="",...
  </code></pre>
  
  <p>But when I created constructors it's working fine.</p>