Why am I getting System.OutOfMemoryException?
<p>I have following code snippet in c#.</p>

<pre><code> var list = new List&lt;string&gt; { "a", "b", "c" };
            for (int i = 0; i &lt; list.Count; i++)
            {
                list.Add(list[i].ToUpper());
            }
</code></pre>

<p>There is no compile time error in above code,but I am getting<code>System.OutOfMemoryException</code> exception at runtime?</p>
