OutOfMemoryException error
<p>i m just writing the two lines in my windows application project</p>

<pre><code>double[] results = new double[100000000];

double[] results1 = new double[100000000];
</code></pre>

<p>on second line(results1 ) i am getting the Exception  'System.OutOfMemoryException' was thrown.</p>

<p>well is my system Configuration is</p>

<p>RAM- 4 gb</p>

<p>OS - Windows 7</p>

<p>Processor - intel core to duo 2.93 Ghz</p>

<p>how can i resolve this error and why this error occurs</p>

<p>ok as most of the answer are realted to generic list</p>

<pre><code>       List&lt;int&gt; results1 = new List&lt;int&gt;();
         List&lt;int&gt; results2 = new List&lt;int&gt;();



        for (int i = 0; i &lt;= 100000000; i++)
        {
            results1.Add(i);
            results2.Add(i);
        }
</code></pre>

<p>i am getting the same error here also</p>
