Generic List vs Array
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/434761/array-versus-listt-when-to-use-which">Array versus List&lt;T&gt;: When to use which?</a>  </p>
</blockquote>



<p>Hi Guys,</p>

<p>This is probably a really simple question, but since I am just starting out, hopefully you won't mind answering.</p>

<p>Is there any best practice or rule of thumb when to use a list vs an array? For example, a tutorial I am following uses arrays to hold some data, and he is always saying "Oh an array of 40 will be enough because I am never going to use more than that.</p>

<p>However, I have swapped out his arrays for Lists. That way the size of the list can adjust to my needs at run time, and it also allows me to use the IEnumerable iterator so I can use for each loops. </p>

<p>So, is there any downsize to using a List? I am guessing its more of a performance hit than using arrays, but is it significant? Should I try and use Arrays more often or go with Lists and only use arrays if I notice a performance issue?</p>

<p>Thanks for your input!</p>
