title: How to iterate through a list within a generic list
body: <p>I'm trying to serialize each object per each list collection inside a generic list of <code>Object</code>s</p>
  
  <p>As an example I can iterate through each list object <code>alist</code> inside the generic list <code>temp_list</code>, but since I don't know what the <code>v</code> object is until run-time I can't reference its list:</p>
  
  <pre><code>List&lt;AObj&gt; alist = new List&lt;AObj&gt;();
  List&lt;BObj&gt; blist = new List&lt;BObj&gt;();
  
  // .. objects initialized here, plugged into respective lists, etc.
  
  List&lt;Object&gt; temp_list = new List&lt;Object&gt;();
  temp_list.Add(alist);
  temp_list.Add(blist);
  
  foreach (var v in temp_list)
  {
      // Here I want to iterate through the list in each v
      /* 
      foreach (var w in v) &lt;-- This obviously doesn't work because the compiler
                               doesn't know what v is until run-time
      */
  }
  </code></pre>
  
  <p>Where <code>alist</code> and <code>blist</code> have just basic objects:</p>
  
  <pre><code>class AObj
  {
      public string Property1 { get; set; }
      public string Property2 { get; set; }
  }
  
  class BObj
  {
      public string Property3 { get; set; }
      public string Property4 { get; set; }    
  }
  </code></pre>
  
  <p>Is there a way I can have a double <code>foreach</code> that would let me iterate through each object within a list that is within a generic list.</p>
  
  <p>Since the compiler doesn't know <code>v</code> until run-time it's pretty much stuck in limbo right.</p>