title: Faster way to access the last and the first element of a List<int>
body: <p>The language I use is C#.</p>
  
  <p>Let</p>
  
  <pre><code>List&lt;int&gt; numbers = new List&lt;int&gt;();
  </code></pre>
  
  <p>be a list of integers, that we want to use them to do some calculations. Is it faster to access the first element of the list as </p>
  
  <pre><code>numbers[0]
  </code></pre>
  
  <p>or as</p>
  
  <pre><code>numbers.First()
  </code></pre>
  
  <p>Also, if we want to access the last element of the list it is faster to access it as</p>
  
  <pre><code>numbers[numbers.Count-1]
  </code></pre>
  
  <p>or as</p>
  
  <pre><code>numbers.Last()
  </code></pre>