C# adding elements to list in the list (two dimensional list)
<p>I have a list:</p>
<pre><code>List &lt;List &lt;string&gt;&gt; aList = new List &lt;List &lt;string&gt;&gt; ();
</code></pre>
<p>I want add something to the list in this list like that:</p>
<pre><code>aList [0].Add (&quot;item&quot;);
</code></pre>
<p>But I get <code>ArgumentOutOfRangeException</code>, why?</p>
<p>Adding list to list works perfect:</p>
<pre><code>List &lt;string&gt; testList = new List &lt;string&gt; ();
testList.Add (&quot;item&quot;);
aList.Add (testList);
</code></pre>
<p>Without any bugs.
What am I doing wrong?</p>