title: Custom property in C# with list need to access list for each item only
body: <p>I have a custom property called Questions the code is below.</p>
  
  <pre><code>public class Questions
  {
      private List&lt;Question&gt; _q = new List&lt;Question&gt;();
  
      public List&lt;Question&gt; Question
      {
          get { return _q; }
      } 
  }
  
  public class Question
  {
      public string Text { get; set; }
      public string Name { get; set; }
      public string Type { get; set; }
      public string Answer { get; set; }
      private List&lt;string&gt; _Options = new List&lt;string&gt;(); 
  
      public List&lt;string&gt; Option {
        get { return _Options; }
      }
  
  }
  </code></pre>
  
  <p>I then populate the property with the code below</p>
  
  <pre><code>    XmlDocument doc = new XmlDocument();
      Question q = new Question();
      Questions qs = new Questions();
      doc.Load(string.Format(@"questions.xml"));
      XmlNodeList list = doc.SelectNodes("/questions/question");
      foreach (XmlNode node in list)
      {
  
              q.Text = node.SelectSingleNode("text").InnerText;
              q.Type = node.SelectSingleNode("type").InnerText;
              q.Name = node.SelectSingleNode("name").InnerText;
              XmlNodeList options = doc.SelectNodes("/questions/question/options");
              foreach (XmlNode option in options)
              {
                  q.Option.Add(option.SelectSingleNode("option").InnerText);
              }
              load.Visible = false;
              qa.Visible = true;
  
              qs.Question.Add(q);
              DisplayQuestion(qs);
  
      }
  </code></pre>
  
  <p>Now when I try to access it with the code below I do not get the output I expect. And thus this is where I need help. The Sample XML is at the bottom</p>
  
  <pre><code>                Label1.Text = q.Question[CurrentQ].Text;
                  for (int i = 0; i &lt; q.Question[CurrentQ].Option.Count; i++)
                  {
                      CheckBoxList1.Items.Add(q.Question[CurrentQ].Option[i]);
                  }
  </code></pre>
  
  <p>XML:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;questions&gt;
    &lt;question&gt;
      &lt;num&gt;1&lt;/num&gt;
      &lt;type&gt;radio&lt;/type&gt;
      &lt;text&gt;Do you like cake?&lt;/text&gt;
      &lt;options&gt;
        &lt;option&gt;Yes&lt;/option&gt;
        &lt;option&gt;No&lt;/option&gt;
        &lt;option&gt;Sometimes&lt;/option&gt;
      &lt;/options&gt;
      &lt;name&gt;cake&lt;/name&gt;
    &lt;/question&gt;
    &lt;question&gt;
      &lt;num&gt;2&lt;/num&gt;
      &lt;type&gt;dropdown&lt;/type&gt;
      &lt;text&gt;Do you like TV?&lt;/text&gt;
      &lt;options&gt;
        &lt;option&gt;Yes&lt;/option&gt;
        &lt;option&gt;No&lt;/option&gt;
        &lt;option&gt;Sometimes&lt;/option&gt;
      &lt;/options&gt;
      &lt;name&gt;tv&lt;/name&gt;
    &lt;/question&gt;
    &lt;question&gt;
      &lt;num&gt;3&lt;/num&gt;
      &lt;type&gt;checkbox&lt;/type&gt;
      &lt;text&gt;What do you like?&lt;/text&gt;
      &lt;options&gt;
        &lt;option&gt;Cake&lt;/option&gt;
        &lt;option&gt;TV&lt;/option&gt;
        &lt;option&gt;Flipper Reruns&lt;/option&gt;
      &lt;/options&gt;
      &lt;name&gt;flipper&lt;/name&gt;
    &lt;/question&gt;
  &lt;/questions&gt;
  </code></pre>
  
  <p>And the output:</p>
  
  <p>What do you like?</p>
  
  <p>Yes</p>
  
  <p>Yes</p>
  
  <p>Cake</p>
  
  <p>Yes</p>
  
  <p>Yes</p>
  
  <p>Cake</p>
  
  <p>Yes</p>
  
  <p>Yes</p>
  
  <p>Cake</p>