Index was out of range. Must be non-negative and less than the size of the collection
<p>i have this code:</p>

<pre><code>ArrayList list = new ArrayList();
foreach (DataRow dataR in prenume.Rows)
{
    foreach (var item in dataR.ItemArray)
    {
        if (item.Equals("  ")) continue;
        list.Add(item);
        if (input_string.Equals(item.ToString()) &amp;&amp; list.Count &gt; 0 )
        {
            label_hello.Text = "Hello, " + list[2];
        }
    }
}
</code></pre>

<p>When i'm trying to clear the text showed , i get an error which says: </p>

<blockquote>
  <p>Index was out of range. Must be non-negative and less  than the size
  of the collection.</p>
</blockquote>

<p>Later edit: </p>

<pre><code>        Solution found!I was too tired ... sorry for the question!
</code></pre>
