title: How to work with List.GetRange()
body: <pre><code>int k=7;
  int index1=5; 
  </code></pre>
  
  <p><code>arrayNames</code> has 11 values in it.</p>
  
  <pre><code>if (k - index1 &gt; 1)
  {
     arrayNames1 = arrayNames.GetRange(index1, k);
  }
  </code></pre>
  
  <p>But it throws me an error as 
  "<strong>Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.</strong>"</p>