title: Index was out of range error when I add a UserControl to a panel, Microsoft VS C#
body: <p>The behavior of code change between projects </p>
  
  <p>For the first project it runs good 
  I have a string array <code>s[] = ...</code> and <code>s.Count();</code> this function exist 
   and when I add a control to my panel it goes fine. </p>
  
  <p>On the other project </p>
  
  <p>1) <code>s.C</code>  and click on (ctrl-space) it shows me only <code>CopyTo</code> and <code>Clone</code> methods </p>
  
  <blockquote>
    <p>this part is solved as Tim, Ganesh, and Patrick said, by adding <code>using System.Linq;</code></p>
  </blockquote>
  
  <p>2) When I try to add a control to a panel with
     <code>panel.Controls.Add( Custom Control );</code>
     it shows me an error in a messagebox and it add the 
     control and program continues without a problem </p>
  
  <blockquote>
    <p>index was out of range. Must be non negative and 
       less than the size of collection <br> Parameter name: index</p>
  </blockquote>
  
  <p>The add code is not in a <code>try-catch</code>
  I tried to change frameworks it didn't change anything 
  what could be the problem, thanks reading about my problem, and for any help.</p>