title: Getting elements of List by index in C#
body: <p>I am trying to access List items in C#. I have a list as <code>List&lt;int[]&gt;</code>. I have to assign first three elements of List, which are integer arrays, to variables. This is what I do;</p>
  
  <pre><code>int[] c1 = lst.ElementAt(0);
  int[] c2 = lst.ElementAt(1);
  int[] c3 = lst.ElementAt(2);
  </code></pre>
  
  <p>I also tried accessing it by <code>lst[0], lst[1], lst[2]</code> instead of <code>ElementAt()</code>. But although first three elements of list are different from each other, all variables take the value of first item of list. I checked values with debugging. What am I doing wrong and also another question in my mind is, what is the difference between <code>lst[0]</code> and <code>lst.ElementAt(0)</code>.</p>