title: List inside list does not print elements, instead shows System.Collections.Generic.List`1[System.Object]
body: <p>I have a list which contains three items. First element is integer, second one is also an integer and third one is another list. By using for each loop I'm able to print these items. </p>
  
  <pre><code>List&lt;object&gt; mainList= new List&lt;object&gt;();
  
  mainList.Add(binRead.ReadInt32()); // Reads first integer ant adds to mainList
  mainList.Add(binRead.ReadInt32()); // Reads second integer ant adds to mainList
  
  List&lt;object&gt; avlDataList = new List&lt;object&gt;();
  
  for(int i=0; i&lt;n; i++)
  {
    // Reads some data and adds it to avlDataList
  }
  
  mainList.Add(avlDataList); // Adds that list to mainList
  
  foreach(var i in mainList)
  {
     Console.WriteLine(i); // Prints items      
  }
  </code></pre>
  
  <p>I get this output:</p>
  
  <pre><code>8
  1
  System.Collections.Generic.List`1[System.Object]
  </code></pre>
  
  <p>How can I modify my code to see what's inside of that list instead of getting this message? That avlDataList list has 10 elements. So i would like to see 12 elements in total.</p>