title: is there in C# a method for List<T> like resize in c++ for vector<T>
body: <p>When I use <code>resize(int newsize)</code> in C++ for <code>vector&lt;T&gt;</code>, it means that the <code>size</code> of this <code>vector</code> are set to <code>newsize</code> and the indexes run in range <code>[0..newsize)</code>. How to do the same in C# for <code>List&lt;T&gt;</code>?<br>
  Changing the <code>List&lt;T&gt;</code> property <code>Capacity</code> only changes the <code>Capacity</code> but leaves the <code>Count</code> the same, and furthermore the indexes still are in range <code>[0..Count)</code>. Help me out, please.</p>
  
  <p>P.S. Imagine I have a <code>vector&lt;T&gt; tmp</code> with a <code>tmp.size() == 5</code> I cannot refer to <code>tmp[9]</code>, but when I then use <code>tmp.resize(10)</code> I may refer to <code>tmp[9]</code>. In C# if I have <code>List&lt;T&gt; tmp</code> with <code>tmp.Count == 5</code> I cannot refer to <code>tmp[9]</code> (<code>IndexOutOfRangeException</code>), but even when I set <code>tmp.Capacity=10</code> I will not be able to refer to <code>tmp[9]</code> coz of <code>tmp.Count</code> is still 5. I want to find some analogy of resize in C#.</p>